亲,请教一个问题?
[
{
"name": "商户1",
"list": [
{
"chargeOffAmounts": 12,
"writeOffDate": "2023-02-27"
},
{
"chargeOffAmounts": 2,
"writeOffDate": "2023-03-06"
}
]
},
{
"name": "商户2",
"list": [
{
"chargeOffAmounts": 1,
"writeOffDate": "2023-03-05"
}
]
}
]
[
{
"name": "商户1",
"list": [
{
"chargeOffAmounts": 12,
"writeOffDate": "2023-02-27"
},
{
"chargeOffAmounts": 0,
"writeOffDate": "2023-03-05"
},
{
"chargeOffAmounts": 2,
"writeOffDate": "2023-03-06"
}
]
},
{
"name": "商户2",
"list": [
{
"chargeOffAmounts": 0,
"writeOffDate": "2023-02-27"
},
{
"chargeOffAmounts": 1,
"writeOffDate": "2023-03-05"
},
{
"chargeOffAmounts": 0,
"writeOffDate": "2023-03-06"
}
]
}
]
怎么把上面的结构改成下面的。