Hi I have a string that looks like this,
ll: 11, kw: sw, wit: jajar
This data is coming from a Google spreadsheet so this is the way they represent rows.
I want this to be converted to JavaScript for easy parsing. I tried the following but apparently didn't work.
var mz = data.feed.entry[0].content.$t; //which is ll: 11, kw: sw, wit: jajar
var text = "{"+ miz +"}"
var json = JSON.parse(text)
However this doesn't convert it to JSON and gives me the following error,
SyntaxError: JSON.parse: unterminated string at line 1 column 35 of the JSON data
How can I convert such a string to JSON for easy parsing? I also tried splitting the ext using ',' but that give false data if the column contained an ',' in the data so splitting is also not a good solution.
Thanks