mongodb print json without whitespace i.e. unpretty json

后端 未结 6 1130
礼貌的吻别
礼貌的吻别 2020-12-30 19:52

I\'m using mongodb 2.2.0 and am trying to print json in a single line as opposed to \"pretty\" printing using printjson() or find().pretty(). i.e.

6条回答
  •  北海茫月
    2020-12-30 20:35

    With "sort" and "limit" , results can be customised. with mongoexport --type=csv , result can be printed into csv file, which can be read in xls or in one line.

提交回复
热议问题