n = [i for i in a if i.isdigit()]
n = "".join(n)
d = datetime.datetime.strptime(n,"%Y%m%d")
nd = [item for item in data['items'] if item["type"] != "charging_fee"]
import json
with open('1.json') as json_data:
data = json.load(json_data)
nd = [item for item in data['items'] if item["type"] != "charging_fee"]
with open('1.json', 'w') as outfile:
json.dump(nd, outfile)