BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
1 / 18 · Module 3 — DataWeave 2.0 Crash Course · filtered: cheatsheet⊞ allnext →

3.28Functions

You can define reusable functions:

%dw 2.0
output application/json

fun normalizeState(state) =
    upper(trim(state))

---
{
    BillingState:
        normalizeState(payload.billingState)
}

Input:

" fl "

Output:

FL

Again, functional programming.