Mule (Dataweave) transform JSON array to string Mule (Dataweave) transform JSON array to string json json

Mule (Dataweave) transform JSON array to string


Your question title says that " JSON array To string" but the dataweave code attached above has application/csv in the output.

Are you trying to convert into csv?? If that is the expectation, comma is a reserved character for .csv format and that is the reason , is getting escaped with backslash[indem1\,indem2].

If your intention is to convert into java, here is the code that returns String value.

%dw 1.0

%output application/java

payload.documents[0].file.*name joinBy ','