Skip to content

Commit 0c77ac8

Browse files
committed
Merge branch 'fix-filters' into develop
Closes #75. * fix-filters: Fix filter projection parsing
2 parents c75413e + 7d46116 commit 0c77ac8

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

jmespath/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ class Parser(object):
5757
'or': 5,
5858
'flatten': 6,
5959
'star': 20,
60+
'filter': 20,
6061
'dot': 40,
6162
'lbrace': 50,
62-
'filter': 50,
6363
'lbracket': 55,
6464
'lparen': 60,
6565
}

tests/compliance/filters.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,5 +294,22 @@
294294
"result": []
295295
}
296296
]
297+
},
298+
{
299+
"given": {
300+
"foo": [
301+
{"a": 1, "b": {"c": "x"}},
302+
{"a": 1, "b": {"c": "y"}},
303+
{"a": 1, "b": {"c": "z"}},
304+
{"a": 2, "b": {"c": "z"}},
305+
{"a": 1, "baz": 2}
306+
]
307+
},
308+
"cases": [
309+
{
310+
"expression": "foo[?a==`1`].b.c",
311+
"result": ["x", "y", "z"]
312+
}
313+
]
297314
}
298315
]

0 commit comments

Comments
 (0)