My string
is structured in JSON format like this:
"{""c1"": ""value1"", ""c2"": ""value2""}"
After storing it in an SQLITE
database, I use the following Javascript code to retrieve it back as JSON:
var req= "SELECT json_column from my_table";
var result = execSQL(req);
for (var index in res) {
var row= res[index];
consoleLog("test getad ", JSON.parse(row["json_column "]));
Unfortunately, I encounter an error message :
<JSContext: 0x1c0044aa0> SyntaxError: JSON Parse error: Expected '}'
I have spent a considerable amount of time trying to troubleshoot this issue with no success. If necessary, I am open to modifying the string
format in order to successfully retrieve it from the SQLITE
database as a valid JSON
object.
Thank you for your help.