Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To access data from a nested array in Dataweave, you can use the square bracket notation to specify the index of the element you want to access. For example, if you have an array of objects and each object has an array of strings called "names", you can access the first name of the first object like this:

payload[0].names[0]

In the above example, "payload" is the name of the input variable. You can replace it with the name of your input variable.

If you want to access all the names in the array, you can use the map function like this:

payload map $.names

In the above example, we are using the map function to iterate over each object in the input array and return its "names" array. The "$" sign represents the current item being processed in the iteration.