I know that in the MongoDB terminal, I can run "show dbs" to see the available databases. I want to get them programmatically so that I can iterate over them and delete some based upon a regular expression.
I have tried db.runCommand("show dbs") but that doesn't work.
Thanks in advance.