dictionary - Converting map payoad to json payload in mule -


i have output data weaver map below

[{"lnumber":9192428,"inumber":005rps}] 

but while sending payload api want have json payload without [] below

{"lnumber":9192428,"inumber":005rps} 

what best way can achieve in mule.

assuming cannot in dataweave trasformation can put in payload first element of map , use object json transformer:

<set-payload value="#[payload[0]]" doc:name="set payload"/> <json:object-to-json-transformer doc:name="object json"/> 

off course work case have map containing 1 element. aniway suggest see if can directly in dataweave probally make more sense.


Comments