Closed vk342 closed 3 years ago
I see similar issues with numeric values of zero.
{ "a": { "b": 0 } }
I'd expect this to return a match: "$.a[?(@property === 'b' && @ < 1)]" However, it returns an empty array.
Fix released in 5.0.4. Note that this change may now impact other uses of @
where it is not a scalar such as:
$..*[?(@ && @.prop === 'abc')]
Previously, without the @ &&
, it would just silently fail to match, but now (as per other similar cases) it will throw.
@michelnev : You need to use @property
lower case, but otherwise, the fix should address your case as well.
given an object
{"a":{"b":false}}
I expect "$..*[?(@ === false)]" to return a result, in fact, this search returns empty array
As far as I can tell, the issue is on line 674:
because _v === false the expression nether evaluated