I came accross a similar problem my data set was an array of objects called offers, inside which another array called metaData was present.
data Set Example :
offers : [{
Country : 1,
Status:1,
OfferCode :"TEST",
EndUtc : 1234455,
metaData :[{name : "isNewUSer",message :"yes"},
{name : "cohort",message :"bro please"}]
}]
I wanted to fetch all the offers whose metaData had isNewUSer atleast once. Here is the sample query for this requirement.
for o in offers
let a = o.metaData
let c = (for m in a filter m.name == 'IsNewUser' return a)
filter LENGTH(c) > 0 and o.Country == "14" and o.Status ==1
return o.OfferCode
This will return all the offercodes which has isnewuser in its metaData. Thanks.