这是我的 JSON:
[
{
"id": 9741962,
"name": "getName",
"isActive": true
},
{
"id": 1,
"name": "New",
"isActive": true
}
]
我想使用 jsonPath 获取所有名称为 :getName 的对象如何使用 JsonPath 来完成(放心的 onw)
我试试这个
JsonPath.with(jsonResponse).get("findAll { a -> a.name == getName }");
但我收到错误。
java.lang.IllegalArgumentException: No such property: sdfsdf for class: Script1
谢谢。