Closed WilliamYuhangLee closed 10 months ago
The filter() function does not work when there is a filter expression in the jsonpath, and it throws a NotImplementedError. Code to duplicate this error:
obj = { "a": [ {"b": "X"}, {"b": "Y"} ] } jsonpath = parse("$.a[?(@.b==X)]") matches = jsonpath.find(obj) print(matches[0].value) >>> {'b': 'X'} # find() returns correct value result = jsonpath.filter(lambda x: True, obj) >>> NotImplementedError # filter() throws error
@WilliamYuhangLee fixed in https://github.com/h2non/jsonpath-ng/pull/41
@michaelmior @h2non This issue can be closed because it is fixed.
The filter() function does not work when there is a filter expression in the jsonpath, and it throws a NotImplementedError. Code to duplicate this error: