I am trying to do something similar to the below code but instead of printing like last line in the code, I am looking for output to display as list of dicts.
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(studentList) # Output is not looping , I get the following [{'id':
1, 'first_name': 'name1'}] but repeated 10 times in row instead it needs
to increment id until 10 with 1-10 id).
Thanks

