Mongodb – Remove document where populated data is empty after match
I'm trying to add filter on populated data. "populate": [ { "path": "attachments", "select": "_id type", "match": { "type": { "$in": [ 2 ] } } } ] Data without filter [ { _id : "6e43454gvbnbvb7888", name: "T1", attachments :{…