I have this example code:
let testData= [{name:'Joshua',age:22,option:"[{value:'test'}]"},{name:'Ali',age:200,option:"[{value:'test2'}]"}]
let parsedData=JSON.parse(testData[0].option);
console.log(parsedData);
Testing my code using this site: https://es6console.com/
It seems that I'm unable to parse & log the data at all.
Any ideas why this is happening?
optionis invalid JSON asvalueneeds to be quoted...'[{"value":"test"}]'