the rows
key → aggregator name, own aggregator or AggregateSpecIf
key → result, in the order of specs
const totals = aggregateColumns(orders, {
quantity: "sum",
total: "sum",
customer: "countDistinct",
avgTotal: { aggregator: "avg", value: "total" }
});
// { quantity: 549812, total: 27481033.5, customer: 412, avgTotal: 274.81 }
1.1.94
Aggregates several values in one pass over the rows. The keys of
specsname the results; a key is also the default property path.