Suppose we have two objects in memory:
const a = [{
id: 123,
width: 5
}, {
id: 345,
width: 10
}];
const b = [{
id: 345,
height: 2
}, {
id: 123,
height: 3
}];
Now we expect the join of the two objects (database join):
const c = join(a, b);
assert.true(c === {
id: 123,
width: 5,
height: 3
}, {
id: 345,
width: 10,
height: 2
});
Is there any handy "join" function? Or do us have to reivent the wheel?