Back
Is there any operator, which allows me to check, if the value of a field contains a certain string?
Something in this way:
db.users.findOne({$contains:{"username":"son"}})
This can be done by following code:
db.users.findOne({"username" : {$regex : ".*son.*"}});
31k questions
32.8k answers
501 comments
693 users