Is there a way to tell Mongo to pretty print output? Currently, everything is output to a single line and it\'s difficult to read, especially with nested arrays and document
Got to the question but could not figure out how to print it from externally-loaded mongo. So:
This works is for console: and is prefered in console, but does not work in external mongo-loaded javascript:
db.quizes.find().pretty()
This works in external mongo-loaded javscript:
db.quizes.find().forEach(printjson)