besok / jsonpath-rust

Support for json-path in Rust

Home Page:https://crates.io/crates/jsonpath-rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handle length() correctly for nested structures

besok opened this issue · comments

given json:

[
{"verb": "TEST","a":[1,2,3]},
{"verb": "TEST","a":[1,2,3]},
{"verb": "TEST"}, {"verb": "RUN"}
]

given jpath:
$.[?(@.verb == 'TEST')].a.length()

Result: [2]
Expected result: [3,3]