/ Published in: JavaScript
This will loop through an object and display the contents. Very useful when troublshooting JSON or other complex objects in javascript.
Expand |
Embed | Plain Text
function printObject(o){ var output = ''; for (property in o) { output += property + ': ' + o[property]+'; '; } alert(output); }
You need to login to post a comment.
