I\'m using mongodb 2.2.0 and am trying to print json in a single line as opposed to \"pretty\" printing using printjson() or find().pretty(). i.e.
printjson()
find().pretty()
if each item has {} brackets and there are no others then split it up on the brackets using a regular expression.
This would split it up into {..} {..} items. But if there are nested {} it would not work.
var res = s.match(/\{(.|\s)*?\}/g); if(res) for(var x=0;x