首先,看看我的json结构:
file0.json
[
{
"id": "13",
"alternate_id": "12",
"count": 1,
},
{
"id": "14",
"alternate_id": "11",
"count": 1,
}
]
现在,我有了需要在同一个文件中更新的新数据
那么,如何使用python代码更新json文件中的数据,而不必手动打开
我将向您展示我想要的输出:
file0.json文章源自玩技e族-https://www.playezu.com/205887.html
[
{
"id": "13",
"alternate_id": "12",
"count": 2,
},
{
"id": "14",
"alternate_id": "11",
"count": 4,
}
]
软件测试专业文章源自玩技e族-https://www.playezu.com/205887.html 文章源自玩技e族-https://www.playezu.com/205887.html