Database

[{"collection":"collection","count":10,"content":[{"_id":"apples","qty":5},{"_id":"bananas","qty":7},{"_id":"oranges","qty":{"in stock":8,"ordered":12}},{"_id":"avocados","qty":"fourteen"}]}]

Query

db.collection.aggregate([{$project:{collection:1,count:1,content:{$filter:{input:"$content",as:"item",cond:{$eq:["$$item.qty",5]}}}}}])

Result