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.js
Written by Lee Machin
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Mongo
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#