Mule has a JSON-to-Object transformer that can be used to get JSON elements. For example, if your JSON is following: -
{ "token" : 123, "id" : 456, "email" : " abc@abc.com ", "status" : "Success" }
Now, to extract the elements, you need to use: -
<json:json-to-object-transformer returnClass="java.lang.Object" doc:name="JSON to Object" />
And then you can extract as: - #[message.payload.email]
or #[message.payload.status]
source share