Closed RemiRigal closed 9 months ago
When performing an update with a lambda function, the lambda function is correctly detected and called but the returned value is not used.
Example:
import jsonpath_ng expr = jsonpath_ng.parse("foo[*].baz") d = {'foo': [{'baz': 1}, {'baz': 2}]} d = expr.update(d, lambda x, y, z: x + 1)
The expected value for d is:
d
d = {'foo': [{'baz': 2}, {'baz': 3}]}
But values are not updated.
@RemiRigal Could you add a test for this case?
This PR can be closed; @RemiRigal's changes were merged via #149.
When performing an update with a lambda function, the lambda function is correctly detected and called but the returned value is not used.
Example:
The expected value for
d
is:But values are not updated.