user3855589
user3855589

Reputation: 1103

How to access two dimension array in MEL : mule esb

How to access two dimensions array in payload MEL format I have this data in datamapper for ex: I have following payload

ID  NAME    TEST    Source
1   name1   test1   ABC
2   name2   test2   XYZ
3   name3   test3   sourceVal
4   name4   test4   TTT

I want to get sourceVal value. How can I get in payload as two dimension?

Thanks

Upvotes: 0

Views: 1391

Answers (1)

Pontus Ullgren
Pontus Ullgren

Reputation: 705

Providing that your payload is a List of Maps the following MEL expression should get the Source value for the first element.

payload[0]['Source']

If your payload is just a simple two dimensional array you can use

payload[0][3]

Upvotes: 1

Related Questions