const plantDisease={
"apple_scab": {
"symptoms": "Leaves covered in a dark velvet layer, showing velvety olive-green to black spots",
"cause": "Venturia inaequalis",
"natural_control": "Utilize resistant varieties like Prima, Priscilla, Sir Prize, Jonafree, Red free, Dayton, Pristine, Goldrush, Enterprise or Liberty.",
"chemical_control": "Apply fungicide such as Captan."
}}
The JSON data above is successfully processed by most online parsers.
I can also directly input this into the browser's JavaScript console and retrieve the information from there.
However, when attempting to assign it to a variable using JSON.parse(), an error occurs:
var obj = JSON.parse(plantDisease);
*VM568:1 Uncaught SyntaxError: Unexpected token o in JSON at position 1
at JSON.parse (<anonymous>)
at <anonymous>:1:6*