Reputation: 31
I want to create a custom function in Jsonpath, For example, I have a JSON like below:
[
{
'name':'/home/user/Desktop/test.txt',
'executable': True,
'binary': False,
'type':'file'
}
]
I Want to get the content of a file in the path /home/user/Desktop/test.txt
based on its name in JSON. For example, the query is
$.[1].content()
Can I register a function in jasonpath python?
Upvotes: 0
Views: 118