json路径表达式以查找与特定名称对应的值

时间:2019-05-10 05:22:49

标签: java json jsonpath

需要json以下的json路径表达式。

查找与名称对应的appId

[
  {
    "name": "a0vudemo",
    "appId": "80af20be-eddf-4b20-8d82"
  },
  {
    "name": "a1app",
    "appId": "55507d25-d025-4454-9443"
  },
  {
    "name": "a1appswan",
    "appId": "86cfa844-cf58-48b7-b56d"
  }
]
.name=="a1app"

1 个答案:

答案 0 :(得分:0)

$..[?(@.name == 'a1app')].appId

similar question