how i can use e2 80 9clike e2 80 9d operator in mongoose

Solutions on MaxInterview for how i can use e2 80 9clike e2 80 9d operator in mongoose by the best coders in the world

showing results for - "how i can use e2 80 9clike e2 80 9d operator in mongoose"
Isabel
21 May 2018
1// Using MongooseJS
2var name="john";
3UserSchema.find({name: { $regex: '.*' + name + '.*' } }).limit(5);
Chance
13 Jul 2017
1// Using MongoDB Driver
2var colName="v";
3 models.customer.find({ "abc": { $regex: '.*' + colName + '.*' } },
4   function(err,data){
5         console.log('data',data);
6  });
7