未格式化打印
> db.games.find() { "_id" : ObjectId("53d077372826c5d3aae7ad6a"), "game" : "pinball", "user" : "joe", "score" : 5050 }
格式化打印
> db.games.find().pretty() { "_id" : ObjectId("53d077372826c5d3aae7ad6a"), "game" : "pinball", "user" : "joe", "score" : 5050 } >
修改文件,使得find可直接格式化打印
[[email protected] ~]# echo "DBQuery.prototype._prettyShell = true" >> ~/.mongorc.js
待续。。。。
mongodb之find格式化打印
时间: 2024-10-06 03:05:59