Possible Duplicate:
JavaScript data formatting/pretty printer
Would like to to translate a javascript object into a string so that I can display in the browser window.
So an object that looks like this:
{
a:1,
b:2
}
Would display in the browser much the same way. The string might look something like this:
"{<br/>
  a:1, <br/>
  b:2 <br/>
}"
Is there any readily available code that can do this? Or perhaps another slick solution that doesn't involves me writing a function to process all the data myself?
Thanks!