Snippets Collections
[
    {
        "$match": {
            "mealPlan": {
                "$elemMatch": {
                    "portionMeasure": "Tea Spoon",
                    "dishVariation": "Paneer Paratha"
                }
            }
        }
    },
    {
       $count:"toatal"
    }
]
[
    {
        "$match": {
            "mealPlan": {
                "$elemMatch": {
                    "portionMeasure": "Tea Spoon",
                    "dishVariation": "Paneer Paratha"
                }
            }
        }
    },
    {
       $count:"toatal"
    }
]
star

Fri Jun 28 2024 05:34:15 GMT+0000 (Coordinated Universal Time) http://34.74.16.180:3000/question#eyJkYXRhc2V0X3F1ZXJ5Ijp7ImRhdGFiYXNlIjo2NSwibmF0aXZlIjp7ImNvbGxlY3Rpb24iOiJwYXJ0aWNpcGFudERpZXRNZWFsUGxhbkRldGFpbHMiLCJxdWVyeSI6IltcclxuICAgIHtcclxuICAgICAgICBcIiRtYXRjaFwiOiB7XHJcbiAgICAgICAgICAgIFwibWVhbFBsYW5cIjoge1xyXG4gICAgICAgICAgICAgICAgXCIkZWxlbU1hdGNoXCI6IHtcclxuICAgICAgICAgICAgICAgICAgICBcInBvcnRpb25NZWFzdXJlXCI6IFwiVGVhIFNwb29uXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgXCJkaXNoVmFyaWF0aW9uXCI6IFwiUGFuZWVyIFBhcmF0aGFcIlxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSxcclxuICAgIHtcclxuICAgICAgICRjb3VudDpcInRvYXRhbFwiXHJcbiAgICB9XHJcbl1cclxuIiwidGVtcGxhdGUtdGFncyI6e319LCJ0eXBlIjoibmF0aXZlIn0sImRpc3BsYXkiOiJ0YWJsZSIsInZpc3VhbGl6YXRpb25fc2V0dGluZ3MiOnt9fQ==

#aggregation #mongodb #elemmatch #elem #match #$elemmatch
star

Wed Jun 26 2024 17:26:58 GMT+0000 (Coordinated Universal Time) http://34.74.16.180:3000/question#eyJkYXRhc2V0X3F1ZXJ5Ijp7ImRhdGFiYXNlIjo2NSwibmF0aXZlIjp7ImNvbGxlY3Rpb24iOiJwYXJ0aWNpcGFudERpZXRNZWFsUGxhbkRldGFpbHMiLCJxdWVyeSI6IltcclxuICAgIHtcclxuICAgICAgICBcIiRtYXRjaFwiOiB7XHJcbiAgICAgICAgICAgIFwibWVhbFBsYW5cIjoge1xyXG4gICAgICAgICAgICAgICAgXCIkZWxlbU1hdGNoXCI6IHtcclxuICAgICAgICAgICAgICAgICAgICBcInBvcnRpb25NZWFzdXJlXCI6IFwiVGVhIFNwb29uXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgXCJkaXNoVmFyaWF0aW9uXCI6IFwiUGFuZWVyIFBhcmF0aGFcIlxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSxcclxuICAgIHtcclxuICAgICAgICRjb3VudDpcInRvYXRhbFwiXHJcbiAgICB9XHJcbl1cclxuIiwidGVtcGxhdGUtdGFncyI6e319LCJ0eXBlIjoibmF0aXZlIn0sImRpc3BsYXkiOiJ0YWJsZSIsInZpc3VhbGl6YXRpb25fc2V0dGluZ3MiOnt9fQ==

#aggregation #mongodb #$converter #elemmatch #elem #match #$elemmatch

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension