Thursday, July 20, 2017

Mule ESB - How to read JSON payload content?

In this blog, I'm going to explain how to read json payload in the mule flow.

For an example, we will assume that json payload receives as below
{
    "persons": [{
            "person": {
                "name": "Tharanga Wijeweear"
            }
        }]
}

You have to use the JSON prefix to access the json payload.

If you need to access the name of the first person, you need to write the mule expression as below.
#[json:persons[0]/person/name]

You can use the same steps followed in the previous blog (Mule ESB - How to read JSON payload content?)

Enjoy..!!

1 comment: