我想获得vehicleCode
vehicleLease
为AS PER LAW OF ENFORCMENT
的{{1}}元素的值。
有人可以帮我解决JSON查询吗?
请在下面找到JSON数据。
{
"StateOffers": [
[{
"vehicleCode": 242214214,
"vehiclePart": [{
"@type": "vehiclePart",
"segments": [{
"@type": "Segment"
"segmentOfferInformation": {
"vehicleMiles": 771,
"awardFare": false
},
"vehicleLease": "AS PER LAW OF ENFORCMENT"
}
],
"stops": 0
}
]
}, {
"vehicleCode": 242214214,
"vehiclePart": [{
"@type": "vehiclePart",
"segments": [{
"@type": "Segment"
"segmentOfferInformation": {
"vehicleMiles": 771,
"awardFare": false
},
"vehicleLease": "MY RULE MY WORLD"
}
],
"stops": 0
}
]
}
]
]
}
这是我试过的表达方式:
$..vehicleCode[?($..vehicleLease=="AS PER LAW OF ENFORCMENT")