# read the JSON file and also print the file content in JSON format.
with open(filename, 'r') as f:
d = json.load(f)
print(json.dumps(d, indent=2))
fetch('https://example.com/data.json').then(response => response.json()).then(data => console.log(data));
# read the JSON file and also print the file content in JSON format.
with open(filename, 'r') as f:
d = json.load(f)
print(json.dumps(d, indent=2))
fetch('https://example.com/data.json').then(response => response.json()).then(data => console.log(data));