Can I register custom functions in Jasonpath in python?

100 views Asked by At

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?

0

There are 0 answers