作者:love乄鮰 | 来源:互联网 | 2022-12-14 14:47
I have a JSon structure of this sort JSON A
我有一个这种JSON A的JSon结构
{
"data":[
{
"weekdays":"7",
"A":"122.56",
"month":"9",
"B":"10.96"
},
{
"weekdays":"8",
"A":"100",
"month":"9",
"B":"8.87"
}]}
JSON B
{
"data":[
{
"weekdays":"7",
"A":"986.5",
"month":"9",
"B":"47.8"
},
{
"weekdays":"8",
"A":"170.85",
"month":"9",
"B":"196.65"
}]}
I want to a resulting JSON which would add JSON A and JSON B and the resulting JSON is below
我想要一个结果JSON,它将添加JSON A和JSON B,结果JSON如下
resulting JSON
{
"data":[
{
"weekdays":"7",
"A":"1109.96",
"month":"9",
"B":"10.96"
},
{
"weekdays":"8",
"A":"270.85",
"month":"9",
"B":"8.87"
}]}
How do I manage to get the result in Python without converting it to dictionary and writing logic for the dictionary?
我如何设法在Python中获得结果而不将其转换为字典并为字典编写逻辑?
1 个解决方案