Back
db.foo.find().limit(300)
won't do it. It still prints out only 20 documents.
db.foo.find().toArray() db.foo.find().forEach(printjson)
db.foo.find().toArray()
db.foo.find().forEach(printjson)
will both print out very expanded view of each document instead of the 1-line version for find():
To print out more than 20 items (documents) in MongoDB's shell you can use the following code:-
DBQuery.shellBatchSize = 300
1.2k questions
2.7k answers
501 comments
693 users