update,
This commit is contained in:
12
jsonpath-tryout/main.py
Normal file
12
jsonpath-tryout/main.py
Normal file
@@ -0,0 +1,12 @@
|
||||
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('leagueTable.homeTeam.all.teamPlayed')
|
||||
|
||||
for match in jsonpath_expression.find(json_data):
|
||||
print(f'Employee id: {match.value}')
|
Reference in New Issue
Block a user