jmespath / jmespath/jmespath.js
Filters not working intuitively
- Dominant language
- JavaScript
- Stars
- 847
- Forks
- 101
- PR merge metrics
- No merged PRs in 30d
Description
Maybe it is my misunderstanding, but with this data:
```
{
"a": {
"b": [{
"c": {
"d": {
"e": "foo"
}
},
"something": "bar"
}, {
"c": {
"d": {
"e": "miss"
}
}
}]
}
}
```
With the following query, nothing returns:
`a.b[*].c.d[?e == 'foo']`
But this does work:
`a.b[*].c.d|@[?e == 'foo']`
And in JSON Path (JayWay implementation for example):
`a.b[*].c.d[?(@.e == "foo")]` is the equivalent.
Is this intentional? they seem functionally equivalent but obviously are not. This fails in the playground (JavaScript), but also fails in the Java implementation.
Is this a spec issue? As designed? Common bug in all implementations? Where do we report something like this that seems to be prevalent across all of JMES?
(https://github.com/jmespath/jmespath.test/issues/15)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.