I want query something as SQL"s like:
select * from users where name like "%m%"How to do the same in mongodb?
I can"t find a operator for like in the documentation.
That would have to be:
You're looking for something that contains "m" somewhere (SQL's '%' operator is equivalent to regexps' '.*'), not something that has "m" anchored to the beginning of the string.