Usage of filterObject In Dataweave In this tutorial we will demonstrate how can we use the filterObject in dataweave Using filterObject we can Iterates a list of key-value pairs in an object and applies an expression that returns only matching objects, filtering out the rest from the output. Step 1 We will use the…
Read MoreReduce 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)…
Read MoreDescendants 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
Read MoreRetrieve Unique Records In Dataweave 2.0 In this tutorial we will demonstrate how You can use distinctBy function to Retrieve Unique Records In Dataweave 2.0 from an array ,distinctBy can also be used to remove the duplicate key/value pair from object. Example 1: Input: Dataweave Expression: Output: Example 2: Input: Dataweave Expression: Output:
Read MoreFilter In Dataweave Filter in dataweave used to return the matching values as per the expression applied. I will use the below input and filter the employee on as per there salary and age Input: Dataweave Expression: Output:
Read MoreOrderBy 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…
Read MoreMap function in Dataweave Map function in Dataweave is used to iterate over array and output the result in to an array Here is the below Example from which we want to extract the First name and Last name and append both string by space Input: We can write the below dataweave code to…
Read More