My payload is
<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 json array input given)
[{"Name":"My name","Address":"add1","Location":"NY"}]
Now, I need to get data from the payload:
<logger message="#[payload.Name]" level="INFO" doc:name="Logger"/>
it prints null. How do I get data from the payload using MEL? Is there any simpler way of getting in Groovy or xpath?
EDIT
Passed single json data as:
{"Name":"My name","Address":"add1","Location":"NY"}
logger:
<logger message="#[payload.Name]" level="INFO" doc:name="Logger"/>
it prints null value.