I have a json data structure as follow:
"_id" : {
Inst_Id: 1119689706
},
"items" : [
{
"Token" : "Let",
"Lemma" : "let",
"POS" : "VERB"
},
{
"Token" : "'s",
"Lemma" : "-PRON-",
"POS" : "PRON"
},
{
"Token" : "face",
"Lemma" : "face",
"POS" : "VERB"
},
{
"Token" : "it",
"Lemma" : "-PRON-",
"POS" : "PRON",
}
]
My items are basically fields which have arrays of token of sentences (e.g. "Let's face it inside.) How can I search for 2 or more criteria inside the same item of an array? I have tried $elemMatch but it only matches elements across arrays and not inside one array. For example, I want to look for a sentence for which the token is "face" AND the POS is "VERB" at the same time.