import json res = { } with open('wuhun.json','r',encoding='utf8') as f: j = json.load(f) for i in j: res[i] = j[i]['1'] with open('wuhun.json','w',encoding='utf8') as f: json.dump(res,f)