Updated: Sep 4
This is a compilation of all the core functions that can be used in DataWeave 2.0 according to MuleSoft's official documentation, separated by input and output.
The link to each function's official documentation page is provided in the list. There you can find more details about the functions and examples on how to use them.
You can use ctrl+F or cmd+F to search for specific keywords and get to the function you're looking for.
List of functions
Array to Array
Plus plus (++) - Concatenates two arrays into a new array.
Minus minus (--) - Removes items listed in the second array from the first array.
distinctBy - Iterates over an array and returns the unique elements in it.
filter - Iterates over an array and returns the matching values from a given expression.
find - Returns an array with the indices (or indexes) of the elements from the array that matched a specific value.
flatMap - Iterates over each item in an array and flattens the results.
flatten - Turns a set of subarrays into a single, flattened array.
map - Iterates over items in an array and outputs the result into a new array.
maxBy - Iterates over the array and returns the highest array according to the provided expression.
minBy - Iterates over the array and returns the lowest array according to the provided expression.
orderBy - Reorders the array's elements based on the given criteria.
reduce - Applies a reduction expression to the elements in the array.
unzip - Groups the values of the given sub-arrays by matching indices (or indexes) and returns new sub-arrays with the matching indices. Note: performs the opposite of zip.
zip - Merges elements from two arrays into an array of arrays. Note: performs the opposite of unzip.
Array to Boolean
contains - Returns true if the array contains a given value, otherwise false.
isEmpty - Returns true if the array is empty, otherwise false.
max - Returns the highest boolean in the given array.
maxBy - Iterates over the array and returns the highest boolean according to the provided expression.
min - Returns the lowest boolean in the given array.
minBy - Iterates over the array and returns the lowest boolean according to the provided expression.