最佳答案
您可以使用Transform Component并编写dataweave代码,如下所示:
%dw 2.0
output application/json
---
payload pluck(message,property,index) -> {(index) :{(property) :message}}
这应该工作。
关于java - 如何在Mule 4中将hashmap转换为正确的json格式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59540847/