finding in mongoose using a name code example
Example 1: mongoose search by name
let ids = ['id1','id2','id3']
let data = await MyModel.find(
{'_id': { $in: ids}}
);
Example 2: finding in mongoose using a name
var name = 'Peter';
model.findOne({name: new RegExp('^'+name+'$', "i")}, function(err, doc) {
//Do your action here..
});