How can I turn [object Object] to a string so I can see what's actually in the array. I tried toString() but that produced the same result as before
-
see:: stackoverflow.com/questions/5612787/…Sudhir Bastakoti– Sudhir Bastakoti2014-06-30 11:20:15 +00:00Commented Jun 30, 2014 at 11:20
-
Object.prototype.toString.call(myVar) -stackoverflow.com/questions/8511281/…Mark Walters– Mark Walters2014-06-30 11:21:40 +00:00Commented Jun 30, 2014 at 11:21
-
@Sudhir I would rather point to the question about debugging in JavaScript.VisioN– VisioN2014-06-30 11:22:31 +00:00Commented Jun 30, 2014 at 11:22
Add a comment
|
1 Answer
It's possible with the method JSON.stringify() :
alert(JSON.stringify(yourObject));
Or with console.log() (visible in your debugger javascript, like Firebug) :
console.log(yourObject);