lets say I have an array that looks like this:
var arr = [{
"id": 1,
"content": "[{\"number\":1,\"name\":\"Image\",\"description\":\"\",\"fields\":\"[{\\\"number\\\":1,\\\"text\\\":\\\"Image Test\\\",\\\"description\\\":\\\"\\\",\\\"responseType\\\":\\\"Image\\\",\\\"options\\\":\\\"[]\\\"},{\\\"number\\\":2,\\\"text\\\":\\\"test2\\\",\\\"description\\\":\\\"\\\",\\\"responseType\\\":\\\"Text\\\",\\\"options\\\":\\\"[]\\\"}]\"}]"
}];
I'm trying to access the content which is a nested array.
Im doing this:
var myArray = JSON.parse(arr.content);
console.log(myArray);
But this always returns this error:
SyntaxError: JSON Parse error: Unexpected identifier "undefined"
what I'm I doing wrong here?