In this post, I am going to list a set of page as navigation, so that we can use MongoDB easier.
Code
格式化MongoDB的输出
通过mongo自带的命令行进入后,db.coll_name.findOne(),可以发现mongo返回的数据是被format过的,看起来各种爽。但若你抽一下,改用db.coll_name.find(),瞬间弥漫而来的是各种unformatted数据,根本没法看。其实我们很容易就可以调整让它显示地更加漂亮。 现在有两种方法可以做到这点。