如何解决JSON路径未过滤嵌套集合
我是JSON的新手,我想问问如何根据子元素/列过滤嵌套的集合? 我试图这样写,但是不起作用:
$ .. []。contracts [?($ .. []。assignments []。ContractId == $ .. []。contracts [*] .ContractId)]
我想获取与ContractId字段的工作分配集合相匹配的合同集合。
谢谢您的帮助!
{
"items" : [ {
"PersonId" : 1000,"PersonNumber" : "123456","CorrespondenceLanguage" : null,"BloodType" : null,"DateOfBirth" : "1965-12-13","DateOfDeath" : null,"CountryOfBirth" : "XX","RegionOfBirth" : null,"TownOfBirth" : "Londek","ApplicantNumber" : "000","CreatedBy" : "sss","CreationDate" : "2018-12-11T05:39:50.279+00:00","LastUpdatedBy" : "xxx","LastUpdateDate" : "2020-08-18T15:10:50.167+00:00","workRelationships" : [ {
"PeriodOfServiceId" : 1,"contracts" : [ {
"ContractId" : 11,"links" : [ ]
} ],"assignments" : [ {
"ContractId" : 12,"links" : [ ]
},{
"PeriodOfServiceId" : 2,"contracts" : [ {
"ContractId" : 12,"links" : [ ]
} ],"assignments" : [ {
"ContractId" : 11,"links" : [ ]
} ],"links" : [ ]
} ],"count" : 1,"hasMore" : false,"limit" : 25,"offset" : 0,"links" : [ ]
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。