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