You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Should filters pushed to the bottom of the query work? #79
If we then apply the filter, [?(@.type == "B")], to each of those values in turn, it selects nothing, because filters are applied to object/dict values without referencing their keys/properties.
Changing the filter to [?(@ == "B")] will give us a single node with the value "B".
Activity
jg-rp commentedon Feb 11, 2025
Hi @NiklasRosenstein,
I believe this behaviour to be correct, according to RFC 9535, albeit not immediately intuitive.
If we apply
$[*].payloadto your example data without the filter, we get a node list containing these values:[ { "type": "A" }, { "type": "B" }, { "type": "C" } ]If we then apply the filter,
[?(@.type == "B")], to each of those values in turn, it selects nothing, because filters are applied to object/dict values without referencing their keys/properties.Changing the filter to
[?(@ == "B")]will give us a single node with the value"B".