var result = "";
result += "[";
for(i=0;i<=10;i++)
{
result += "{ 'key': 'keyvalue" + i + "', 'values': [";
for(j=0;j<=10;j++)
{
result += "{ 'key': 'subkeyvalue"+j+"', 'value':"+j+"}, ";
}
result += "]}, ";
}
result += "]";
console.log(result);
console.log(JSON.stringify(result));
console.log(JSON.parse(result));
If i try to convert String to JSON.parse. I am getting below error.
JSON.parse: expected property name or '}' at line 1 column 4 of the JSON data
can you please any one resolve this problem.