【发布时间】:2020-08-13 04:45:37
【问题描述】:
我需要找到给定 json 结构的 json 路径
{
"name": "ninja",
"contry": "India",
"Account": [
{
"id": "123",
"orgId": 223,
"investment": [
{
"invetmentId": "111",
"name": "India tech",
"performance": [
{
"id": "123",
"performanceSet": [
{
"amount": "210",
"currency": "YEN"
},
{
"amount": "231",
"currency": "USD"
},
{
"amount": "233",
"currency": "USD"
},
{
"amount": "250",
"currency": "IND"
}
],
"loyal": "250"
}
]
}
]
}
]
}
这里我需要从performanceSet 中获取货币为美元的金额,并且只会返回第一次出现该值的金额?
它应该返回
[
"231"
]
【问题讨论】:
-
我认为用 json-path 是不可能的。让我们看看有什么办法。
标签: jsonpath json-path-expression