使用 db.collection.find() 返回数据,每一条占一整行,一点格式都没有,好难阅读,不知道有没有方法格式化返回的值,比如每个key-value占一行这种的
db.collection.find()
闭关修行中......
db.collection.find().pretty();
Add a once and for all method, execute the following code in the shell
echo "DBQuery.prototype._prettyShell = true" >> ~/.mongorc.js
This way you will be pretty() anytime and anywhere
The method upstairs is good
db.collection.find().pretty();
Add a once and for all method, execute the following code in the shell
This way you will be pretty() anytime and anywhere
The method upstairs is good