DataWeave Examples Conditionally Reduce a List Via a Function Conditionally Reduce a List through a Function This DataWeave example flattens the input to something simpler. For each element in the input, it conditionally includes a contentTypes field only in case it has any values. It then rearr...
callback The function to apply. Example This example shows how reduce can be used to reverse a string. Source %dw 2.0 output application/json --- "hello world" reduce (item, acc = "") -> item ++ acc DataWeave✓ Copied Output "dlrow olleh" Json✓ Copiedreduce...