I have a string
that looks like this:
"{""c1"": ""value1"", ""c2"": ""value2""}"
As you can notice, it is in JSON format. I store it in an SQLITE
database, and then I use the following Javascript code to get it again in JSON
format :
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 "]));
But I get this error :
<JSContext: 0x1c0044aa0> SyntaxError: JSON Parse error: Expected '}'
Can you please tell me why I have this error, I've spent hours trying to resolve it but with no success. I can change the string
format if it is necessary, all I need is to get it again from SQLITE
as JSON
object.
Thank you in advance.