MongoDB $elemMatch $in

前端 未结 3 1223
感动是毒
感动是毒 2021-02-04 02:24

So, I have a database with a load of arrays in documents in it. I want to find entire documents where my queries are an exact match for one or more array elements using $i

3条回答
  •  深忆病人
    2021-02-04 03:04

    Just try this (Tested)

    {
    "unusual":  { 
            $all:[{
                $elemMatch:{"defindex":313},
                $elemMatch:{"_particleEffect":6}
            }]
        }
    }
    

提交回复
热议问题