When you are debugging your javascript code, this code is very useful to tell you the content of your javascript object:
JSON.stringify(YOUR_OBJECT_HERE, null, 4);
The second argument alters the contents of the string before returning it. The third argument specifies how many spaces to use as white space for readability.