Reduce Function

Reduce Function   Reduce function is used to do any computation while iterating on an array, computation result is not lost while iteration. it’s a very helpful function where you have to do computation on some array element. reduce(Array<T>, (item: T, accumulator: T) -> T): T | Null or Array<T> reduce( (item: T, accumulator: T)…

Share this:
Read More

Descendants Selector

Descendants Selector   Works on arrays and objects and to retrieves the values of all matching key-value pairs in the sub-tree under the selected context regardless of the hierarchical structure of the fields. Let’s see how Descendants Selector works. The .. selector acts on arrays and objects Input Payload Dataweave expression: Output

Share this:
Read More

Sort Using OrderBy In Mule 4

OrderBy   By using OrderBy Dataweave function you Reorders the elements of an input using criteria that acts on selected elements of that input. In this tutorial I will use the dataweave OrderBy function to sort the Employee as per the employee age Input Dataweave Expression Result You can see the result in ascending order…

Share this:
Read More