Spaces:
Build error
Build error
| import json | |
| import requests | |
| with open("respons12.json", "r") as f: | |
| data = json.load(f) | |
| print(data['receipts'][0].keys()) | |
| items =data['receipts'][0]['items'] | |
| print(f"Your purchase at{data['receipts'][0]['merchant_name']}") | |
| # for item in items: | |
| # print(f"{item['description']} - ${item['amount']}") | |
| print("_" * 30) | |
| print(f"merchant_address:{data['receipts'][0]['merchant_address']}") | |
| print(f"merchant_phone:{data['receipts'][0]['merchant_phone']}") | |
| print(f"merchant_name:{data['receipts'][0]['merchant_name']}") | |
| print(f"region:{data['receipts'][0]['region']}") | |