{
"users":[
{
"name": "muhammad ishaq",
"email": "ishaq@2gmail.com",
"password": "123456"
},
{
"name": "muhammad shafi",
"email": "shafi@2gmail.com",
"password": "123456"
}
]
}
import json
studentsList = []
print("Started Reading JSON file which contains multiple JSON document")
with open('students.txt') as f:
for jsonObj in f:
studentDict = json.loads(jsonObj)
studentsList.append(studentDict)
print("Printing each JSON Decoded Object")
for student in studentsList:
print(student["id"], student["name"], student["class"], student["email"])