import os
import json

if __name__ == "__main__":
    result_json_array = []
    for file_name in os.listdir(r"E:/yuxin/nuofang-data/base/result0513"):
        f = open(r"E:/yuxin/nuofang-data/base/result0513/" + file_name, 'r', encoding="utf-8")
        f_content = f.read()
        f.close()
        f_json = json.loads(f_content)
        f_json['file_name'] = file_name
        result_json_array.append(f_json)
    r_file_name = open("E:/yuxin/nuofang-data/base/result0513.json", 'w', encoding="utf-8")
    r_file_name.write(json.dumps(result_json_array, ensure_ascii=False))
