I am experiencing the error Uncaught SyntaxError: Unexpected Token when trying to parse the json data
Uncaught SyntaxError: Unexpected Token
This is my ajax code (json2.js):
When you set dataType to json, jQuery parses the data for you. So you don't need to put it through JSON.parse, you can just refer to data as a normal Javascript object.
dataType
json
JSON.parse
data