Database

[{"pipedrive_id":"1677","transactions":[{"pipedrive_id":"1838","firstName":"John",},{"pipedrive_id":"2000","firstName":"Ken",}]},{"pipedrive_id":"5000","transactions":[{"pipedrive_id":"5001","firstName":"John",},{"pipedrive_id":"2000","firstName":"Ken",}]},]

Query

db.collection.aggregate([{$match:{pipedrive_id:"1677"}},{$unwind:"$transactions"},{$match:{"transactions.pipedrive_id":"1838"}},{$project:{_id:0,pipedrive_id:1,transactions:1}}])

Result