How to print out more than 20 items (documents) in MongoDB's shell?

前端 未结 6 1093
南笙
南笙 2020-11-28 00:22
db.foo.find().limit(300)

won\'t do it. It still prints out only 20 documents.

db.foo.find().toArray()
db.foo.find().forEach(printjs         


        
6条回答
  •  感情败类
    2020-11-28 01:11

    You can use it inside of the shell to iterate over the next 20 results. Just type it if you see "has more" and you will see the next 20 items.

提交回复
热议问题