Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

jsonpath in python verwenden

import json

from jsonpath_ng import jsonpath, parse

json_string = '{"id":1, "name":"Pankaj"}'
json_data = json.loads(json_string)

jsonpath_expression = parse('$.id')

match = jsonpath_expression.find(json_data)

print(match)
print("id value is", match[0].value)
Source by www.journaldev.com #
 
PREVIOUS NEXT
Tagged: #jsonpath #python #verwenden
ADD COMMENT
Topic
Name
1+3 =