I'm trying to parse my string to a JSON object, but it doesn't work. I get a syntax error when I debug the code. Here is the string I want to parse:
var listString = "{ title: 'MySchema'," + "root: {id:'" + headID + "',"
+ "title:'" + topHead[0].Designation + "'," + "subtitle:'" + headName + "',";
liststring = liststring + "{ id: '" + head + "'," + "title: '" + childs[cnt].Designation + "'," + "subtitle: '" + title + "'," + "type: '" + childs[cnt].Typav + "'";
liststring = getChildNodes(tasksEntries, head, liststring); liststring = liststring + "},";}liststring = liststring + "]}}";} listString = childliststring;
$.parseJSON(listString );
I don't get any JSON objects in return. Any thoughts?