import json path="......" with open(path) as f: obj = json.load(f) obj["data"].append({"name":"hayder zaeim"}) with open(path,"w+") as of: json.dump(obj,of)