[Solved] JSON Parse : Uncaught SyntaxError: Unexpected token , JavaScript [closed]


Objects in JSON are represented with {}. Object have key-value pairs. For example:

{
    "foo": "bar",
    "example: "something",
    "key": "value"
}

Arrays in JSON are represented with []. They are a list of numbers, strings, objects, etc. For instance:

[
    "foo",
    "bar",
    "something",
    "example"
]

You’re problem is that you are using {} for an array. Try changing your JSON to:

[
    ["0","0",650,"0","0",357,"0","0","0","0",200,"0",48,"0",3053,"0","0","0","0","0",45,50,["0","0",299,101,"0",126,"0","0","0","0",630,"0","0",88,3157,"0","0","0","0","0",10,21],["0","0",123,3030,"0",368,"0","0","0","0","0","0",76,-44,1967,"0","0","0","0","0",29,64],["0","0",88,343,"0",320,"0","0","0","0","0","0",175,"0",336,"0","0","0","0","0",21,98],["0","0",503,410,"0",1127,"0","0","0","0","0","0",77,87,1264,"0","0","0","0","0",5,128],["0","0",1754,607,40,2565,"0","0","0","0","0","0",102,70,12506,"0","0","0","0","0",178,1966],["0","0","0","0",60,153,"0","0","0","0","0","0","0","0","0","0","0","0","0","0",15,"0"]
]

Also, in JavaScript, JSON is the default Object Notation, so you don’t need to call JSON.parse unless your JSON is being represented as a string.

solved JSON Parse : Uncaught SyntaxError: Unexpected token , JavaScript [closed]