My payload
<json:json-to-object-transformer returnClass="java.lang.Object" doc:name="JSON to Object"/>
<logger message="#[payload]" level="INFO" doc:name="Logger"/>`
which prints (this is the given input of the json array)
[{"Name": "My Name", "Address": "add1", "Location": "NY"}]
Now I need to get the data from the payload:
<logger message="#[payload.Name]" level="INFO" doc:name="Logger"/>
it prints zero. How to get data from a payload using MEL? Is there an easier way to access Groovy or xpath?
EDIT
Passed single json data as:
{"Name":"My name","Address":"add1","Location":"NY"}
Registrar:
<logger message="#[payload.Name]" level="INFO" doc:name="Logger"/>
it prints a null value.
source
share