"SyntaxError: Unexpected token o in JSON at position 1

JavaScript
var newData = JSON.stringify(userData)

Source

Also in JavaScript: