W
W
wsdrap2018-02-07 15:37:30
JavaScript
wsdrap, 2018-02-07 15:37:30

How to find data in mongo?

Let's say I have the name Fermented Fish-Less Fish Sauce | no-cook. Looking for this name. Searches on the first word, on the last. But if I want, for example, to find Fermented Fish, how can I do it?
In JS, I have it like this now

query.title = {
          $regex   : data.title,
          $options : 'i' };

Please tell me how to make it search?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question