Saving table - how-to and complications with dataChanged

I have been searching for ways that I can save a table - JSON, CSV whatever. I have a process to save it which seems to work - however - the problem is that the screen edit of the table does not jive with the internal layout. So it saves my original records, not ones added later. My understanding is that the dataEdited, (now dataChanged) apparently needs to be updated every time the table is edited. Has anyone successfully done this? Maybe if I knew how to format the changes in the dataChanged function.

I seem to have found the answer by looking at the examples section - specifically the "send commands" example.