I am getting this json from server:
{"cust":[{"email":"[email protected]","url":"www.uzti.com"},
{"email":"[email protected]","url":"www.url.com"}]}
I have checked this json on JsonLint site and it shows valid json. But I have retrieve the elements by Javascript. When I do this JSON.parse(json), I get the following error:
SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 9 of the JSON data. Even if I directly use jaon.cust, it shows undefined How do I Resolve this?
console.log(json)right before theJSON.parse(json), do you get the exact same result as the json data you pasted here?