Python 删除json文件中的一些行
我有一个json文件: 我想删除此文件中的某些行,如下所示:Python 删除json文件中的一些行,python,json,Python,Json,我有一个json文件: 我想删除此文件中的某些行,如下所示: 我怎样才能用python脚本做到这一点?你刚才不是问了这个吗?不明白你想告诉我什么吗?很抱歉 import json data = json.loads(open("input.json").read()) with open("output.json", "w") as outfile: json.dump(data["Stock"]["Vehicule"], outfile)
我怎样才能用python脚本做到这一点?你刚才不是问了这个吗?不明白你想告诉我什么吗?很抱歉
import json
data = json.loads(open("input.json").read())
with open("output.json", "w") as outfile:
json.dump(data["Stock"]["Vehicule"], outfile)