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 documents.
You can use the pretty() function for pretty print in MongoDB shell as default see the code below:-
In MongoDB, a function exists known as pretty function. It will display all the documents in separate lines, refer to the following screenshot:
Here 'operate' is my collection name.