【发布时间】:2020-10-12 20:00:20
【问题描述】:
有没有办法转换一个看起来像这样的json:
{
"id": "1",
"object": [{
"object_1": "hi",
"object_2": "hello"
},
{
"object_1": "hello",
"object_2": "hi"
}]
}
到我可以在每个字典中存储父 ID 而不必像这样更改名称的地方?
{
"id": "1",
"object_1": "hi",
"object_2": "hello"
},
{"id": "1",
"object_1": "hi",
"object_2": "hello"
}
【问题讨论】:
-
当然可以!你试过什么?
标签: python json python-3.x dictionary