command to view collection in mongodb code example Example: show collections in mongodb db.getCollectionNames()