def data_iterator(path):
    for root, dirs, files in os.walk(path):
        for f in files:
            if f.endswith('.json'):
                fp = os.path.join(root, f)
with open(fp) as o:
    data = json.load(o)
Reading huge number of json files in Python?