%dw 2.0
output application/json
---
{
"onNull": []
reduce ((item, accumulator) -> item ++ accumulator)
then ((result) -> sizeOf(result))
onNull "Empty Text"
}
onNull
onNull<R>(previous: Null, callback: () -> R): R
Executes a callback function if the preceding expression returns a null
value and then replaces the null
value with the result of the callback.
Introduced in DataWeave version 2.4.0.