After receiving a simple array as my JSON response:
[35,55]
The Chrome network inspector confirms that it is valid JSON. However, when attempting to parse the xhr.responseText using JSON.parse, I am confronted with the error:
Uncaught SyntaxError: Unexpected token :
I have also experimented with using JSON.stringify and utilizing the array without parsing it in JSON.parse, but unfortunately, JavaScript does not recognize it as an array.
According to JSONLint, the JSON is indeed valid.
At this point, I am unsure of what steps to take next. My goal is to successfully utilize my xhr array as an actual array in JavaScript.