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
Since it is basically a javascript shell, you can also use toArray():
db.collection.find().toArray()
However, this will print all the documents of the collection unlike pretty() that will allow you to iterate.
Refer: http://docs.mongodb.org/manual/reference/method/cursor.toArray/