joinWith
Inner join two arrays by key with a custom combiner function. Unlike join() which returns {l, r} pairs, joinWith lets you shape the output.
left(required): left arrayright(required): right arrayleftKeyFn(required): lambda extracting key from left itemsrightKeyFn(required): lambda extracting key from right itemscombinerFn(required): lambda(leftItem, rightItem) -> result
utlx
let customers = [{id: 1, name: "Alice"}, {id: 2, name: "Bob"}]
let orders = [{customerId: 1, product: "Widget"}]
{
joined: joinWith(customers, orders,
(c) -> c.id, (o) -> o.customerId,
(c, o) -> {name: c.name, product: o.product}
)
// [{name: "Alice", product: "Widget"}]
}