I am getting a payload with some keys that are having values for example
1. mulesoft[04444]
2. muleworld[88990]
now I want to extract content that is enclosed in square brackets here.
let's take an actual problem, here incoming payload
{
"message": "Hello world[009]",
"sender" : "myself[001]",
"to": "friend[0089]"
}
here I want to create a Mulesoft function inside data weave code that I can use to extract value that is enclosed in the square brackets
Please write a DWL code fro this.
question from:https://stackoverflow.com/questions/65900945/how-to-get-a-value-from-a-string-value-that-is-coming-in-a-payload