Checks if the value of a field is in a string

  Kiến thức lập trình

In MongoDB how to check if a string contains the value of the name field of documents?
For example, I have string Nemoabcxyz I want it to be able to match {"_id": 1, "name": "Nemo"}

Note that I don’t want to use fuzzy search because it will probably return results I don’t expect,

New contributor

Lilac is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT