I am trying to generate output files in such a way, first 7 entities into first json file, and next 7 entities into second json file, so on until the end.
data_path = 'C:/Users/User/Desktop/Tables/'
for i, data_item in enumerate(data):
with open(data_path + str(i) + '.json', 'w') as outfile:
outfile.write(simplejson.dumps({'entities': [data]}, indent=4, ignore_nan=True))
My script above, generates 1 entity for 1 Json file, but I really need 7 entities for each output Json file.