We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dpath.search
afilter
The afilter does not seem to work as described. Even using the example from the documentation does not work:
import dpath import json x = { "a": { "b": { "3": 2, "43": 30, "c": "Waffles", "d": "Waffles", "e": { "f": { "g": "Roffle" } } } } } def afilter(x): if "ffle" in str(x): return True return False result = dpath.search(x, '**', afilter=afilter) print(json.dumps(result, indent=4, sort_keys=True))
{ "a": { "b": { "3": 2, "43": 30, "c": "Waffles", "d": "Waffles", "e": { "f": { "g": "Roffle" } } } } }
It seems to be outputting ALL keys.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The
afilter
does not seem to work as described. Even using the example from the documentation does not work:test.py
Output
It seems to be outputting ALL keys.
The text was updated successfully, but these errors were encountered: