How to query MongoDB with "like"
Asked 07 September, 2021
Viewed 1.3K times
  • 49
Votes

I want to query something with SQL's like query:

SELECT * FROM users  WHERE name LIKE '%m%'

How can I achieve the same in MongoDB? I can't find an operator for like in the documentation.

30 Answer