【发布时间】:2020-05-18 04:03:36
【问题描述】:
如何将旧的json从logic_1、logic_2全部keyname重命名为逻辑(去掉下划线和序列号)(ps:json文件中的数据多数据通过循环get)
[
{
"logic_1": "NOT",
"StudyDescription": "",
"SeriesDescription": "C\\+",
"ImageComments": ""
},
{
"logic_2": "NOT",
"StudyDescription": "\\-C",
"SeriesDescription": "\\-C",
"ImageComments": "\\-C"
}
]
到
[
{
"logic": "NOT",
"StudyDescription": "",
"SeriesDescription": "C\\+",
"ImageComments": ""
},
{
"logic": "NOT",
"StudyDescription": "\\-C",
"SeriesDescription": "\\-C",
"ImageComments": "\\-C"
}
]
【问题讨论】:
标签: python json filter replace