def save(): // func to save data with open("vrhsp.json", "w") as outfile: j=0 for row_id in Trw.get_children(): rowki = Trw.item(row_id)['values'] #print(rowki[1]) #print(type(rowki)) //control data taking dict0={ j: { "text": "j+1", "image": "", "values": rowki, "open": 0, "tags": ""}, } j=+1 json.dump(dict0, outfile,indent=4, ensure_ascii=False)` It is needed to treeview all data transport to a JSON file. It is important to get items from the treeview. Not one by one. All data gets collected and sent to .json in one shot. It must be .json file; it is not permitted to .csv. or other The .json file is below: { { "0": { "text": "1", "image": "", "values": [ 2, 45, 677, 899, "-241.0", "10.05.2025", "22.59" ], "open": 0, "tags": "" } "1": { "text": "2", "image": "", "values": [ 3, 33, 23, 22, "-242.0", "10.05.2025", "22.59" ], "open": 0, "tags": "" } But I want a comma (,) in datas. What I want is given below: {{ "0": { "text": "1", "image": "", "values": [ 2, 45, 677, 899, "-241.0", "10.05.2025", "22.59" ], "open": 0, "tags": "" } , // It should be a comma here !! "1": { "text": "2", "image": "", "values": [ 3, 33, 23, 22, "-242.0", "10.05.2025", "22.59" ], "open": 0, "tags": "" } Continue reading...