Pretty print MongoDB queries in REPL
Make your query more readable when using the REPL by chaining pretty() on to the end of it:
db.find({})
.limit(10)
.pretty()
Don't want to do it for every query? Enable it by default!
Just paste this into your terminal (not into the Mongo REPL):
echo "DBQuery.prototype._prettyShell = true" >> ~/.mongorc.jsWritten by Lee Machin
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Mongo
Authors
Did you know?
JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#