how to get all collections of database in mongo command code example
Example: list all collections in the MongoDB shell
JavaScript (shell):
db.getCollectionNames()
Node.js:
db.listCollections()
JavaScript (shell):
db.getCollectionNames()
Node.js:
db.listCollections()