我有以下JSON数据:
{
"a1": {"name": "Andersson", "choices": [
{"code":"MPSOF","meritScore":750},
{"code":"MPALG","meritScore":750},
{"code":"MPCSN","meritScore":800}
]
},
"a2": {"name": "Jonsson", "choices": [
{"code":"MPALG","meritScore":700}
]
},
"a3": {"name": "Larsson", "choices": [
{"code":"MPCSN","meritScore":850},
{"code":"MPALG","meritScore":850}
]
}
}
现在,我需要编写一个JSONPath查询,以查找所有第一个“选择”(数组索引为0),并且meritScore大于800。
我想到了以下查询:$.*.choices[0][?(@.meritScore>800)]
,但是,在http://www.jsonquerytool.com上对其进行测试似乎无法正常工作(它返回false
)。