import fiona import requests import utm from geopy.geocoders import Nominatim import time import json filepath = 'Downloads/ttg-data.json' mainObj = {} polygonNum = 0 rr = 1 with open(filepath) as f: data = json.load(f) for (p,q) in data.items(): singleFieldObj = q fieldid = p fieldname = q["FieldAddress"] mainObj[fieldid] = fieldname with open('ttg-new.json', 'w') as f: json.dump(mainObj,f)