I assume that what you mean is you have the actual JavaScript *object*, not
a JSON string that represents the object, right?

If you had a JSON string, you could just look at the string to see its keys
and values. Or you could paste it into www.jsonlint.com to pretty-print it.

If you have a JavaScript object, one easy way to view it is to load your
page in Firefox with Firebug installed, and then add this line to your code:

console.dir( yourObject );

-Mike

On Thu, Oct 8, 2009 at 11:20 AM, Thai Dang Vu <tdan...@gmail.com> wrote:

> Hi everybody,
>
> Supposed that I have a json object but I don't know anything about its keys
> and values. Is there anyway to print out all the key and value pairs in that
> object?
>
> Thanks.
>

Reply via email to