Mongodb or and 查询

  • 查询两个条件符合一个即可
{
    $or : [
        {
            $and : [
                {
                    "Type" : "Unorganized"
                },
                {
                    "Tel" : "Procedure"
                },
                {
                    "Factor" : {
                        "$ne" : {
                        }
                    }
                } 
            ]
        },
        {
            $and : [
                {
                    "Type" : "Organized"
                },
                {
                    "SiteType" : "Procedure"
                } 
            ]
        } 
    ]
}

  

 

posted @ 2023-08-14 14:06  蜡笔小新↓  阅读(7)  评论(0)    收藏  举报