Answer the question
In order to leave comments, you need to log in
How to select records by occurrence in mongoose?
Hello!
I'm trying to implement a simple search by occurrence.
Those. I have a list of users who have logins.
Using User.find(login: query) we will find all users by a hard match
. And I need, for example, when requesting 'irv', all users who have such an entry in the login are found.
For example irvdev1, 1irvdev, irvvvvvdev and so on.
I hope I wrote clearly.
I found the .where() method in the documentation, but I can’t figure out how to use it.
Thank you!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question