How can I know how many collections exists in a database in mongoDB in mongoshell (mongosh)
The only thing I have is db.getCollectionNames()
but I can't count the lenght ot that array.
CodePudding user response:
As far as I know you can use db.getCollectionNames().length