我有不同长度的多个数组,每个数组都有键值对的对象。
[{date: "2018-11-26", totalHours: 2},{date: "2018-11-27", totalHours: 2}]
[{date: "2018-11-26", totalHours: 4},{date: "2018-11-27", totalHours: 2},{date: "2018-11-28", totalHours: 8}]
[{date: "2018-11-26", totalHours: 4},{date: "2018-11-27", totalHours: 2},{date: "2018-11-28", totalHours: 6},{date: "2018-11-30", totalHours: 9}]
考虑到所有数组,如何对相同日期的 totalHours 求和?