Answers for "mongodb print collection names"

0

list all collections in the MongoDB shell

JavaScript (shell):
db.getCollectionNames()

Node.js:
db.listCollections()
Posted by: Guest on July-19-2020
0

getcollectionnames

// Returns an Array containing names of all collection
// in the current Database
db.getCollectionNames()
Posted by: Guest on June-09-2020

Browse Popular Code Answers by Language