For instance, if the following is my documents
:
{
"field": [
"hello",
"random wording",
{
"otherId": 3232,
"otherId2": 32332
}
],
}
Would it be possible to create a query that matches both index 0
and index 2
?
I attempted a query like
model.find({field: "hello")
which seemed to successfully execute.
However, if I aim to mix and match, say I desire a query that matches both index 0
and index 2
, or perhaps if in index 2
the value is actually an object
that needs to be queried with "otherId2": 32332
, instead of just matching the entire object
.
Any help or advice would be appreciated. Thank you in advance.