How can I convert a JavaScript object into a string?
Example:
var o = {a:1, b:2} console.log(o) console.log(\'Item: \' + o)
Output:
If you're just outputting to the console, you can use console.log('string:', obj). Notice the comma.
console.log('string:', obj)