Skip to content

rightJoin

rightJoin(left, right, leftKey, rightKey) → array · Array

Right join — returns all items from the right array, with matching items from the left. Unmatched left fields are null.

  • left (required): left array

  • right (required): right array

  • leftKey (required): lambda to extract join key from left elements

  • rightKey (required): lambda to extract join key from right elements

utlx
let orders = [{id: 1, product: "A"}, {id: 2, product: "B"}]
let shipments = [{orderId: 2, date: "2026-05-01"}, {orderId: 3, date: "2026-05-02"}]
rightJoin(orders, shipments, (o) -> o.id, (s) -> s.orderId)
// includes shipment for orderId 3 even though no matching order

Released under AGPL-3.0.