161
rated 0 times
[
166]
[
5]
/ answers: 1 / hits: 6965
/ 10 Years ago, sat, may 17, 2014, 12:00:00
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
More From » node.js