This is my json file:
{"dates" : ["15-12-2021", "16-12-2021", "17-12-2022"]}
Here is my code:
with open(path_to_json_file, 'r') as jsonf:
data = json.load(jsonf)
data_ = data['dates']
for date in data_:
imgs_to_delete.append(dates)
#I want to remove here date from the json file
After I saved the date variable in my list, I want to remove it from the json file.
e.g.: I only want to remove "16-11-2021" from the json file. How can I do this.