MongoDB shell 格式化

直接的方法:

db.collection.find().pretty();

如果想要所有的查询都格式化,可以执行:

echo "DBQuery.prototype._prettyShell = true" >> ~/.mongorc.js
原文地址:https://www.cnblogs.com/voctrals/p/4975839.html