//[dataOptions[id]]
似乎工作
但//[dataOptions[id=value]]
不起作用
我试图让所有的父母都dataOptions
在 where dataOptions.id
equals val
。第二个有效吗?我怀疑我用来解析查询的 JPath 有错误。但我不确定我的查询是否有效。
[
{
"dataOptions": {
"id": "id1",
"count": "10"
},
"name": "Leon",
"children": [
{
"dataOptions": {
"id": "id2",
"count": "10"
},
"name": "Leon",
"children": [],
"isExpanded": false
},
{
"dataOptions": {
"id": "id2",
"count": "10"
},
"name": "Leon",
"children": [],
"isExpanded": false
}
],
"isExpanded": false
},
{
"dataOptions": {
"id": "id3",
"count": "10"
},
"name": "Leon",
"children": [],
"isExpanded": false
},
{
"dataOptions": {
"id": "id4",
"count": "10"
},
"name": "Leon",
"children": [],
"isExpanded": false
}
]