merge
Combines an Array of Objects together and returns a new Object.
Basic example
Section titled “Basic example”Collapses the two objects into one, applying the default aggregations: numeric value fields are summed to 30, the differing id strings collect into an array, and the shared group: "A" collapses to a single value.
import {merge} from "@d3plus/data";
merge([
{id: "foo", group: "A", value: 10},
{id: "bar", group: "A", value: 20},
]);
Parameters
import {merge} from "@d3plus/data";