Narek
0
Q:

How i can use “LIKE” operator in mongoose

// Using MongooseJS
var name="john";
UserSchema.find({name: { $regex: '.*' + name + '.*' } }).limit(5);
0
// Using MongoDB Driver
var colName="v";
 models.customer.find({ "abc": { $regex: '.*' + colName + '.*' } },
   function(err,data){
         console.log('data',data);
  });
0

New to Communities?

Join the community