how to get collection name in mongodb code example
Example 1: show collections in mongodb
db.getCollectionNames()
Example 2: getcollectionnames
// Returns an Array containing names of all collection
// in the current Database
db.getCollectionNames()