Can anyone help me with this..The following Json object has multiple arrays which has multiple object in it. Using dataweave we need to extract the common objects of all arrays based on 'id' key. The extracted output may be in any format. Input: { "userslist1":[ { "username":"", "id":12 }, { "username":"", "id":13 }, { "username":"", "id":19 } ], "userslist2":[ { "username":"", "id":12 }, { "username":"", "id":14 }, { "username":"", "id":13 } ], "userslist3":[ { "username":"", "id":12 }, { "username":"", "id":15 }, { "username":"", "id":13 } ] }
Thanks Jason. I'm brand-new to mulesoft and working out a study strategy whilst doing the Trailhead modules in Salesforce. Great explanation of this concept thankyou.
How is posible to make lower case keys and values in json payload then values can be array? if no arrays then its: (lower $$) : (lower $), but cant find example for arrays
This can be achieved in Mule 3.7/8/9 using Mule requestor connector , by default it will not be available , we have to install ..so that you can read file in the middle of flow execution
Good video. One thing you didn't mention was how to give names to the $$ and $ generic variables. You could have used this: map ((index, element) -> { index: index, data: element }) or later in your video perhaps map ((index, person) -> { name: person.name, age: person.age }). This is not spelled out very well in the Mulesoft documentation, unfortunately, but there is an example usage with a paragraph to describe as the second example under the Map section ( docs.mulesoft.com/mule-user-guide/v/3.9/dataweave-operators#map) Keep up the great videos!
Hi jason, I have employee data(first name,last name,age & etc) in XML but i need to retrieve the data based only the last name. input sample: john reddy kamal reddy babu naidu I need to retrieve the elements based on the lastname,lastname having reddy. How to retrieve this ?