Reverse a String in Dataweave

 https://developer.mulesoft.com/learn/dataweave

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

                                                                           Input

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

{
"message": "Hello world!"
}

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

                                                                           Dataweave

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

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

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

                                                                           Output

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

"!dlrow olleH"

Comments

Popular posts from this blog

Time Differences