core.js:4197 ERROR SyntaxError: Unexpected token o in JSON at position 2 at JSON.parse (<anonymous>) json string parse angular code example
Example 1: Uncaught (in promise) SyntaxError: Unexpected token O in JSON at position 0
var stringified = JSON.stringify(data);
var parsedObj = JSON.parse(stringified);
console.log(parsedObj);
Example 2: "SyntaxError: Unexpected token o in JSON at position 1
var newData = JSON.stringify(userData)