Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

jsonpath in python verwenden

import json
from jsonpath_ng import jsonpath, parse

with open("db.json", 'r') as json_file:
    json_data = json.load(json_file)

print(json_data)

jsonpath_expression = parse('employees[*].id')

for match in jsonpath_expression.find(json_data):
    print(f'Employee id: {match.value}')
Source by www.journaldev.com #
 
PREVIOUS NEXT
Tagged: #jsonpath #python #verwenden
ADD COMMENT
Topic
Name
3+1 =