//有如下格式[{name: "title", value: "名称1"},
{name: "startTime", value: "17:00:16"},
{name: "endTime", value: "19:01:18"},
{name: "title", value: "名称2"},
{name: "startTime", value: "20:03:18"},
{name: "endTime", value: "21:04:20"}]//需要转换成下面这样的格式[{title: "名称1", startTime: "17:00:16", endTime: "19:01:18"},
{title: "名称2", startTime: "20:03:18", endTime: "21:04:20"}]自己写了很多循环才实现,所以想问下有没有比较优雅的实现方式
添加回答
举报
0/150
提交
取消