I am trying to parse this JSON string:
var string = '{"DataSerialized":{"DocumentElement":{"NAME_LIST":"FIELD_1":"VALUE_1","FIELD_2":"VALUE2","FIELD_3":"VALUE_3"}}}}';
how a JSON object how this:
{
"DataSerialized":{
"DocumentElement":{
"NAME_LIST":{
"FIELD_1":"VALUE_1",
"FIELD_2":"VALUE2",
"FIELD_3":"VALUE_3"
}
}
}
}
For that, I tried with jQuery.parseJSON(string) but the result is wrong:
SyntaxError: JSON.parse: expected ',' or '}' after property value in object at line 1 column 60 of the JSON data
I think that it's a problem with quotes, but I don't know what's wrong exactly
Thanks in advance
SOLUTION:
{ after NAME_LIST
var string = '{"DataSerialized":{"DocumentElement":{"NAME_LIST":{"FIELD_1":"VALUE_1","FIELD_2":"VALUE2","FIELD_3":"VALUE_3"}}}}';