title: circumvent ERROR Converting circular structure to JSON when doing JSON.stringify()?
body: <p>For debugging I want to serialize javascript objects with JSON.stringify(myobject). But this gives:</p>
  
  <pre><code>TypeError: Converting circular structure to JSON
  </code></pre>
  
  <p>Is there a way to prevent this, by for instance pruning the output tree?</p>
  
  <p>Some more background:</p>
  
  <p>I want to collect some data on different objects and see what is going on, and why a feature works for one situation but not for another. By comparing outputs I hope to be able to find differences which explains why it is not working in "another" situation.
  I'm using jquery and my debug horse is called chrome. If there are better alternatives for doing this type of debugging activities I'm also very much interested!</p>
  
  <p>Cheers,
  jeroen.</p>