求教下
{
"result": {
"affectedDocs": 4,
"code": 0,
"data": [
{
"total": -3,
"totalScore": -68.700000000000003,
"产品ID": "M02",
"客户ID": "C01"
},
{
"total": -2,
"totalScore": -16.600000000000009,
"产品ID": "CP20210921213453",
"客户ID": "C05"
},
{
"total": 7,
"totalScore": 233.09999999999999,
"产品ID": "CP20210820202352",
"客户ID": "C05"
},
{
"total": 5,
"totalScore": 111,
"产品ID": "CP20210921213453",
"客户ID": "C01"
}
],
"errCode": 0,
"errMsg": "",
"message": "",
"systemInfo": [
],
"timeCost": 271
}
浙一的数据格式交叉统计代码要怎么写
3 个回复
DCloud_uniCloud_WYQ
详细描述下,你要什么样的结果
3***@qq.com (作者)
我想要的结果是根据客户ID相同的话,把数据和在一起,比如{"客户ID": "C01",{
"total": -2,
"totalScore": -16.600000000000009,
"产品ID": "CP20210921213453",
"客户ID": "C05"
},{
"total": 7,
"totalScore": 233.09999999999999,
"产品ID": "CP20210820202352",
"客户ID": "C05"
}}
这个样子
3***@qq.com (作者)
我想得到的结果是这样的比如根据客户ID{客户ID:{"total": 5,
"totalScore": 111,
"产品ID": "CP20210921213453",
"客户ID": "C01"},客户ID{"total": -3,
"totalScore": -68.700000000000003,
"产品ID": "M02",
"客户ID": "C01"}}
大概这个样子