I'm trying to import data from another database into a 'table' fieldtype via a plugin, and have a couple questions.
When setting the content on the EntryModel, are there any methods to assist in setting the rows and/or columns, or do I need to just format the data as a string in the expected format?
$entry->getContent()->setAttributes(array(
'tableFieldHandle' => '[{"col1":"data","col2":"data"}]'
));
Secondly, what's the recommended method to prepare strings for a table field (i.e. so as to escape or encode double and single quotes)?