how to get all documents in a collection using mongodb code example Example: get all data in collection mongodb db.collection_name.find().pretty()