print collection using mongo cli code example Example: show collections in mongodb db.getCollectionNames()