I encountered that error:
import jmespath AttributeError: Module jmespath has no attribute search
I used the version 1.0.1 of this module.
I wanted to run the following code:
import jmespath
person = {
"person": [
{'id': 1, 'name': 'ali', 'age': 42, 'children': [
{'name': 'sara', 'age': 7},
{'name': 'sima', 'age': 15},
{'name': 'sina', 'age': 2}
]},
{'id': 2, 'name': 'reza', 'age': 65, 'children': []}
]
}
print(jmespath.search('person[*].children[?age>`10`].name', person))