具有深度过滤器的 JSONPath 表达式

J.M*_*nny 4 json jsonpath

给定以下 JSON 数组

[
 {
  "id":1, 
  "list":[
    {"id":1,"type":{"ref":1,"tema":3}},
    {"id":2,"type":{"ref":1,"tema":6}}
  ]
 },...
]
Run Code Online (Sandbox Code Playgroud)

使用 jsonPath 表达式,如何获取所有 type.ref==1 的列表元素?在我通过 Google 找到的所有示例中,我找不到具有 2 个级别的过滤器。

ste*_*tph 6

我认为这

$..list[?(@.type.ref == 1)]
Run Code Online (Sandbox Code Playgroud)

或者那个

$..list..type[?(@.ref == 1)]
Run Code Online (Sandbox Code Playgroud)

应该做。