I saved a lot of aggregations pipeline into a collection :
{
"_id" : ObjectId("56d06614070b7f2b117b23db"),
"ops" : [
{
"$unwind" : "$x"
},
{
"$unwind" : "$y"
},
{
"$match" : {
"brand" : "z"
}
}
]
}
I want to make some statistics on those data :
db.apicalls.aggregate([{"$unwind":"$ops"},{"$match":{***...***}}])
The result from the unwind operation alone is like this :
{ "_id" : ObjectId("56d06631070b7f11117b23d4"), "ops" : { "$match" : { "brand" : "zzz" } } },
{ "_id" : ObjectId("56d06631070b7f11117b23d4"), "ops" : { "$unwind" : "$x" } }
I want to be able to match only the $match operations saved into the collection. Someone haves how to select on the key "$match" ?
Thanks
