Answers for "How i can use “LIKE” operator in mongoose"

0

How i can use “LIKE” operator in mongoose

// Using MongooseJS
var name="john";
UserSchema.find({name: { $regex: '.*' + name + '.*' } }).limit(5);
Posted by: Guest on October-08-2020
0

How i can use “LIKE” operator in mongoose

// Using MongoDB Driver
var colName="v";
 models.customer.find({ "abc": { $regex: '.*' + colName + '.*' } },
   function(err,data){
         console.log('data',data);
  });
Posted by: Guest on October-08-2020

Code answers related to "How i can use “LIKE” operator in mongoose"

Code answers related to "Javascript"

Browse Popular Code Answers by Language