how to fix SyntaxError: Unexpected token a in JSON at position 0 error js code example
Example 1: fetch SyntaxError: Unexpected token < in JSON at position 0
JSON.parse(theStringThatIsNotJson);
Example 2: unexpected token s in json at position 0
var s = '"something"';
var result = JSON.parse(s);