Reverse an Array in Dataweave MuleSoft

----------------------------------------------------------------------------------------------------------------------

                                                                           Input

----------------------------------------------------------------------------------------------------------------------

[1,2,3,4,5,6,7,8,9,10]

----------------------------------------------------------------------------------------------------------------------

                                                                           Dataweave

----------------------------------------------------------------------------------------------------------------------

%dw 2.0
output application/json
---
payload [-1 to 0]

----------------------------------------------------------------------------------------------------------------------

                                                                           Output

----------------------------------------------------------------------------------------------------------------------

[
10,
9,
8,
7,
6,
5,
4,
3,
2,
1
]

Comments

Popular posts from this blog

Time Differences