For debugging I want to serialize javascript objects with JSON.stringify(myobject). But this gives:
TypeError: Converting circular structure to JSON <
TypeError: Converting circular structure to JSON
You can now use Douglas Crockford's JSON Stringify plugin:
https://github.com/douglascrockford/JSON-js
This has a decycle option in the download file cycle.js. You could also use console.log() and inspect the JSON in your browsers console.
cycle.js
console.log()