{
    "_id" : "201",
    "shopServiceCategorys" : [
        {
            "shopServiceCategoryId" : NumberLong(4593138),
            "shopid" : NumberLong(201),
            "serviceCategoryId" : NumberLong(5),
            "status" : 3.0
        },
        {
            "shopServiceCategoryId" : NumberLong(4593139),
            "shopid" : NumberLong(201),
            "serviceCategoryId" : NumberLong(12),
            "status" : 4.0
        }
    ],
   
}

更新 id=201,shopServiceCategoryId.serviceCategoryId=12 的status值为0

执行($定位符,可以找到匹配的数组位置,但只更新第一个,怎么更新所有匹配的):

db.getCollection('shop').update(
   {"_id":"201","shopServiceCategorys.serviceCategoryId":12},
   {"$set":{"shopServiceCategorys.$.status":0}
       }
)