In MongoDB how to use $lookup to get not matched records only? In MongoDB how to use $lookup to get not matched records only? database database

In MongoDB how to use $lookup to get not matched records only?


Use one more $match condition at the end of the pipeline

db.master_product_details.aggregate([  { "$match": { "seller_user_id": "seller_id" }},  { "$lookup": {    "from": "master_order_details",    "localField": "seller_sku_id",    "foreignField": "sku_id",    "as": "Orders"  }},  { "$match": { "Orders": [] }}])