How to do mapping for below data.
ParameterMap{[card=[15242424211], phone=[54545454545]]}
This data is dynamic which is coming from http request as part queryparameters. I want to form query params in the form #[{'p1':'v1', 'p2':'v2'}] dynamically
for example into [{'card': '15242424211','phone':'54545454545'}]
i.e Array of maps(application/java) Using Dataweave in mule can you please help on this
use following code
With this output will be
{"card": "15242424211","phone":"54545454545"}
you can wrap it under array if required by usingThis will produce output as
[{"card": "15242424211","phone":"54545454545"}]
Please referorg.mule.module.http.internal.ParameterMap
for details of HTTP params.Hope this help.
Update:- Please use following for setting query parameters for HTTP outbound request.