I
I
irvdev2017-03-09 15:18:15
MongoDB
irvdev, 2017-03-09 15:18:15

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

1 answer(s)
N
napa3um, 2017-03-09
@irvdev

stackoverflow.com/questions/9824010/mongoose-js-fi...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question