%dw 2.0

import * from dw::core::Arrays

var users = [{id: "1", name:"Mariano"},{id: "2", name:"Leandro"},{id: "3", name:"Julian"},{id: "5", name:"Julian"}]
var products = [{ownerId: "1", productName:"DataWeave"},{ownerId: "1", productName:"BAT"}, {ownerId: "3", productName:"DataSense"}, {ownerId: "4", productName:"SmartConnectors"}]
output application/json
---
{
    a: join(users, products, (user) -> user.id, (product) -> product.ownerId),
    b: leftJoin(users, products, (user) -> user.id, (product) -> product.ownerId),
    d: outerJoin(users, products, (user) -> user.id, (product) -> product.ownerId)
}