Open DazzaL opened 1 year ago
It is incorrect behavior compared to the internet-draft of JSONPath.
However, this site uses jsonpath-plus as a parser that is not actively maintained. There is no alternative implements in nodejs, so I plan to provide it, but it will take a long time.
If you want to fix this issue, please report to the jsonpath-plus repository instead.
take a sample JSON document with no arrays in it:
if i want to return the "m" node if say attr1 = test1 then i can do this:
$.[?(@.attr1 == "test1")]
which results in this seen:this is in disagreement to the Java jayway library which when given:
will result in
[]
. Jaway wants the expression to be:$.m[?(@.attr1 == \"test1\")]
and if that is given, this will be returned:[{"attr1":"test1","attr2":"test2"}]
if I use
$.m[?(@.attr1 == \"test1\")]
in the jsonpath.com implementation though,No match
is returnedis one of these implementations incorrect?