-
-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Labels
Description
When a singular filter query appears as part of a logical expression, we are incorrectly using the node's value rather than treating the query as an existence test.
Given the query $.users[?@.admin && @.score > 1]
and the data:
{
"users": [
{
"name": "Sue",
"score": 100
},
{
"name": "John",
"score": 86,
"admin": true
},
{
"name": "Sally",
"score": 84,
"admin": false
},
{
"name": "Jane",
"score": 55
}
],
"moderator": "John"
}
We get
[
{
"name": "John",
"score": 86,
"admin": true
}
]
And we should get
[
{
"name": "John",
"score": 86,
"admin": true
},
{
"name": "Sally",
"score": 84,
"admin": false
}
]