find()
method on a Collection you’ll need to toArray()
on results as it doesn’t run your query but instead returns new Cursor instance// Using <https://github.com/Colingo/continuable-mongo> api
var collection = client.collection('someCollection');
collection.insert([{
some: 'key',
value: 'pair'
}], function (err, inserted) {
collection.find({
some: 'key'
}).toArray(function (err, results) {
// results = found documents
});
});