I am trying to extract multiple objects from the same JSON file. My JSON file content looks something like this:
{"business_id": "1",
"Accepts Credit Cards": true,
"Price Range": 1,
"type": "food"}
{"business_id": "2",
"Accepts Credit Cards": true,
"Price Range": 2,
"type": "cloth"}
{"business_id": "3",
"Accepts Credit Cards": false,
"Price Range": 3,
"type": "sports"}
I am trying the below code which works fine for a file containing only one JSON object.
import json
with open("business.json") as json_file:
json_data = json.load(json_file)
print(json_data)
How can I solve this problem? I did not find any solution for parsing JSON data from the same file.