[ { "$match": { "$expr": { "$ne": ["$foodStatus", "APPROVED"] } } }, { "$lookup": { "from": "mastermealplan", "localField": "dishVariation", "foreignField": "mealPlan.dishVariation", "as": "mealData" } }, { "$match": { "$expr": { "$gt": [{ "$size": "$mealData" }, 0] } } }, { "$project": { "mealData": "$mealData.planName", "dishVariation": 1 } } ]
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter