It might be good to add tests for using an absolute path (that is $ instead of @) in a filter selector, e.g. $[?$.a==1]. Currently the filter tests only seem to cover relative paths (@) or invalid selectors with absolute paths, but not any valid selectors with absolute paths.
Might be good to cover:
existence test without segment: $[?$]
some 'normal' filter expressions, e.g. $[?$.a==1]
using (...), e.g. $[?($.a==1)]
equals self: $[?$==$] (similar to #71)
equals with relative path
selector: $[?@[0] == $[0]] and $[?$[0] == @[0]]
document: [0, [0, 1], [1, 2]]
applying the filter selector to a nested value and making sure $ is evaluated absolute and not relative, for example:
It might be good to add tests for using an absolute path (that is
$
instead of@
) in a filter selector, e.g.$[?$.a==1]
. Currently the filter tests only seem to cover relative paths (@
) or invalid selectors with absolute paths, but not any valid selectors with absolute paths.Might be good to cover:
$[?$]
$[?$.a==1]
(...)
, e.g.$[?($.a==1)]
$[?$==$]
(similar to #71)$[?@[0] == $[0]]
and$[?$[0] == @[0]]
[0, [0, 1], [1, 2]]
$
is evaluated absolute and not relative, for example:$.a[?$.b==2]
{"a": [{"b": 1}], "b": 2}
What do you think?