Database

[{"id":1,"other_thing":"whatever","annoying_array":[{"sub_id":"a","thing_type":"apple"},{"sub_id":"b","thing_type":"pear"}]},{"id":2,"other_thing":"whatever_else","annoying_array":[{"sub_id":"c","thing_type":"carrot"},{"sub_id":"d","thing_type":"pear"},{"sub_id":"e","thing_type":"pear"}]}]

Query

db.collection.aggregate([{"$match":{"annoying_array.thing_type":"pear"}},{"$project":{"id":1,"other_thing":1,"annoying_array":{"$filter":{input:"$annoying_array",as:"item",cond:{"$eq":["$$item.thing_type","pear"]}}}}}])

Result