Back
I want to query something with SQL's like query:
SELECT * FROM users WHERE name LIKE '%m%'
How to do I achieve the same in MongoDB? I can't find an operator for like in the documentation.
You can write it like this:
db.users.find({"name": /.*m.*/})
db.users.find({"name": /m/})
31k questions
32.8k answers
501 comments
693 users