The map Function In DataWeave Mule 4 November 28, 2021 Dataweave / Mule 4 / Mulesoft Iterates over items in an array and outputs the results into a new array.
The filter Function (and Function Type Signatures) In DataWeave Mule 4 November 28, 2021 Dataweave / Mule 4 / Mulesoft This function can be applied to an array. It iterates the array and matches the values with the expression. The output of the filter function is an array with the matching values.
Arrays (dw::core::Arrays) November 28, 2021 Dataweave / Mule 4 / Mulesoft DataWeave 2.0 makes it easier to define an array with a range (" to ").
$, $$, $$$ Syntax November 27, 2021 Dataweave / Mule 4 / Mulesoft For functions that DataWeave provides, you can represent the first, second, and third arguments of the passed lambda as $, $$, and $$$, respectively. When you do this, you do not need to specify the arguments of the lambda when you pass it to the function.
Infix Notation November 27, 2021 Dataweave / Mule 4 / Mulesoft This type of notation is referred to as infix since the operator is in between the two operands that it is working on.
Functions as Values November 27, 2021 Dataweave / Mule 4 / Mulesoft In other words, lambdas become useful when you want to pass functions as arguments to other functions, or return a function from a function.
Lambdas Function November 27, 2021 Dataweave / Mule 4 / Mulesoft DataWeave provides multiple ways to create functions. Just like we have named functions, we have functions without names, called lambdas.
Named Functions November 27, 2021 Dataweave / Mule 4 / Mulesoft We create functions in the declarations section of the script using the fun keyword. This associates a set of functionality with a name.
Functions in DataWeave 2.0 November 27, 2021 Dataweave / Mule 4 / Mulesoft You can define your own DataWeave functions using the fun declaration in the header of a DataWeave script.
Pattern Matching with Literal Values November 27, 2021 Dataweave / Mule 4 / Mulesoft A match expression contains a list of case statements that can optionally have an else statement. Each case statement consists of a conditional selector expression that must evaluate to either true or false.