How can I get collection names without database name from mongodb native driver for nodeJS?
db.collectionNames(function(err, collections) {
if (err) {
log.error(err);
} else {
log.info(collections);
}
});
This code returns something like this:
databaseName.collection1, databaseName.collection2, databaseName.collection3
But i want to get names: collection1, collection2, collection3