I am trying to log my hashmap it looks something like this :
How do I convert it into proper json format ?
You can use the Transform Component and write the dataweave code as follows:
%dw 2.0
output application/json
---
payload pluck(message,property,index) -> {(index) :{(property) :message}}
This should work.
Just add a transform message at the end of flow with
%dw2.0
application/json
---
payload
You can use the Transform Component and write the dataweave code as follows:
%dw 2.0
output application/json
---
payload pluck(message,property,index) -> {(index) :{(property) :message}}
This should work.
© 2022 - 2024 — McMap. All rights reserved.