0

如何在cloudant中专门为(有效负载)编写以下数据的选择器查询?

    {
      "_id": "1575370d5a7a4cdcd11c64f9066ed454",
      "_rev": "1-2c8aa9288c2e86aa83cea78299c63dcf",
      "topic": "smart_parking",

如何为 Cloudant 中的(有效负载)专门编写以下数据的选择器查询?

      "payload": [
        {
          "smart_parking": [
            {

如何为以下 JSON 响应编写选择器?

              "spots": [
                {
                  "read_time": "Wed Jun 21 11:37:55 2017",
                  "awsDeviceIdentifier": "myiot",
                  "vehicle_Make_Model": "suv-crossover",
                  "model_num_car": "subaru_tribeca",
                  "vehicle_make": "subaru",
                  "color": "blue",
                  "time_stamp": 1498045075.780167,
                  "number_plate": "DZDDYXR",
                  "type": "car",
                  "occupied": true
                }
              ]
            }
          ]
        }
      ]
    }

//这是示例一

4

1 回答 1

0

{“选择器”:{

"payload": {
"$elemMatch":{
  "smart_parking": {
  "$elemMatch":{
    "spots":{
    "$or":[
      {
     "$elemMatch":{"number_plate":"DZDDYXR"} 
     },
     {
     "$elemMatch":{"color":"blue"}
     }
     ]
     }

  }
   }  

  }
}

},“字段”:[

] }

于 2017-06-22T19:35:38.090 回答