Parsing a large JSON File

Perspective is everything when you are experiencing the challenges of life.

Joni Eareckson Tada

I was trying to conduct an analysis on a large JSON file over the weekend and I faced several challenges with parsing the data. Eventually, I was able to figure out the solution.

I hope it helps someone in a similar situation.
import json

data_str = open('filename.json', 'r',   encoding='utf-8').read()

data = json.loads(data_str, strict=False)

You can simply loop through the data element using the keys to access the values

for y in data:
     value = y['keys']

Share your thoughts