我寻找n1ql查询其重试在JSONN1Ql查询在阵列
{ “lmrNumber”在阵列满足条件整个JSON在JSON数据:“0000063”, “重量”:“20” , “loadNumber”: “SHREF”, “lineHaulLmr”:[{ “lineHaulResponsibileSite”: “4059”,
“lineHaulArrivalDate”: “2017年1月6日”, “lineHaulDepartureDate”:“01/06/2017“, ”lineHaulDepartureTime“:”21:00“, ”lineHaulArrivalTime“:”22:30“, ”lineHaulStat我们 “:” 待定”, “driverDetails”:{ “驱动程序名”: “”, “SLOC”: “3719”, “ELOC”: “3701”, “jobnumber可以”: “” } } ] }
条件是查询应该检索sloc为4059
在数组中的数据。
我试图以这种方式,但不会检索数据
SELECT * FROM school Where '4059' IN school.lineHaulLmr[*].driverDetails.sloc
其在查询ELOC。 – Sree
如果您正在尝试在数组中进行搜索,请检查此https://developer.couchbase.com/documentation/server/current/n1ql/n1ql-language-reference/arrayfun.html – 11thdimension
它不会发布发行版本。我有检查之前。 – Sree