Is it possible to find objects in a collection by a certain substring, if this substring may be contained in any field of this collection.
For example, my substring is "aa". And I have 2 collections:
{
"_id" : ObjectId("5788a3e4ffcf140b5955eead"),
**"Address" : "aaBB",**
"FirstName" : "First",
"SecondName" : "Second"
}
{
"_id" : ObjectId("7788a3e4fhcf140098725eead"),
"Address" : "bb",
"FirstName" : "First",
**"SecondName" : "aaAA"**
}
So, what query should I use to get these 2 records?
Thank you