finding in mongoose code example
Example 1: mongoose find() example
await MyModel.find({});
await MyModel.find({ name: 'john', age: { $gte: 18 } }).exec();
MyModel.find({ name: 'john', age: { $gte: 18 }}, function (err, docs) {});
await MyModel.find({ name: /john/i }, 'name friends').exec();
await MyModel.find({ name: /john/i }, null, { skip: 10 }).exec();
Example 2: callback mongoose get value from document
var query = Model.find({});
query.where('field', 5);
query.limit(5);
query.skip(100);
query.exec(function (err, docs) {
});