How to use json.load() in Python
This tutorial is How to use json.load() in Python. the full-form of JSON is (JavaScript Object Notation). Python built-in package called JSON. A JSON object contains data in the form of a key/value pair. json.load() takes a file object and returns the JSON object.
Syntax
json.load(file_object)
The JSON looks like this: data.json

Example
import json
f = open('data.json')
data = json.load(f)
for i in data['data']:
print(i)
f.close()
Output
{'id': 1, 'first_name': 'Elle', 'email': '[email protected]', 'gender': 'Female'}
{'id': 2, 'first_name': 'Algernon', 'email': '[email protected]', 'gender': 'Male'}
{'id': 3, 'first_name': 'Karisa', 'email': '[email protected]', 'gender': 'Female'}
{'id': 4, 'first_name': 'Daryl', 'email': '[email protected]', 'gender': 'Female'}