checkList:[
{
date:'2019-01-01',
num:1,
roomId:1
},
{
date:'2019-01-02',
num:1,
roomId:1
},
{
date:'2019-01-03',
num:1,
roomId:1
},
{
date:'2019-01-05',
num:1,
roomId:1
},
{
date:'2019-01-03',
num:1,
roomId:2
},
{
date:'2019-01-04',
num:1,
roomId:2
}
],
checkList2:[
{
date:'2019-01-01',
num:3,
roomId:1
},
{
date:'2019-01-05',
num:1,
roomId:1
},
{
date:'2019-01-03',
num:2,
roomId:2
}
]
最终我想把list这个初始数据变成list2这样的数据要怎么弄,num是天数,roomId是房间id