Answers for "mongo query like"

7

mongodb find like

db.users.find({"name": /.*m.*/});

db.users.find({"name": /m/});

Items.find({"description": {$regex: ".*" + variable + ".*"}}).fetch();
Posted by: Guest on May-21-2020
2

like mongodb

db.collection.find( { "url": { "$regex": ".*a.*"} } );
Posted by: Guest on March-20-2021
1

mongodb regex

{ <field>: { $regex: /pattern/, $options: '<options>' } }
{ <field>: { $regex: 'pattern', $options: '<options>' } }
{ <field>: { $regex: /pattern/<options> } }
Posted by: Guest on November-05-2020
0

like in mongodb

db.users.find({"name": /.*m.*/})
Posted by: Guest on July-31-2020
0

mongo db like

db.users.find({name: /ro$/}) //like '%ro'
Posted by: Guest on June-18-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language