-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
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 Add filter test for equality with self #71) - equals with relative path
- selector:
$[?@[0] == $[0]]and$[?$[0] == @[0]] - document:
[0, [0, 1], [1, 2]]
- selector:
- applying the filter selector to a nested value and making sure
$is evaluated absolute and not relative, for example:- selector:
$.a[?$.b==2] - document:
{"a": [{"b": 1}], "b": 2}
- selector:
What do you think?
f3ath
Metadata
Metadata
Assignees
Labels
No labels