Hi everyone,
i have an array variable "vBody" in the following structure:
[
{
"headers": {
"Content-Disposition": "form-data; name=\"file\"; filename=\"NAME1.pdf\""
},
"body": {
"$Content-type": "application/pdf",
"$content": "CONTENT1"
}
},
{
"headers": {
"Content-Disposition": "form-data; name=\"file\"; filename=\"NAME2.pdf\""
},
"body": {
"$Content-type": "application/pdf",
"$content": "CONTENT2"
}
},
{
"headers": {
"Content-Disposition": "form-data; name=\"file\"; filename=\"NAME3.pdf\""
},
"body": {
"$Content-type": "application/pdf",
"$content": "CONTENT3"
}
}
]
I then use join(variables('vBody'), ',') on the array and get the following string:
{"headers":{"Content-Disposition":"form-data; name=\"file\"; filename=\"NAME1.pdf\""},"body":{"$Content-type":"application/pdf","$content":"CONTENT1"}},{"headers":{"Content-Disposition":"form-data; name=\"file\"; filename=\"NAME2.pdf\""},"body":{"$Content-type":"application/pdf","$content":"CONTENT2"}},{"headers":{"Content-Disposition":"form-data; name=\"file\"; filename=\"NAME3.pdf\""},"body":{"$Content-type":"application/pdf","$content":"CONTENT3"}}
I then want to convert the whole string into a JSON with json(outputs('TEST_Compose_join')). But when I do that I get the following raw output:
{
"headers": {
"Content-Disposition": "form-data; name=\"file\"; filename=\"NAME1.pdf\""
},
"body": {
"$Content-type": "application/pdf",
"$content": "CONTENT1"
}
}
- Why do I only get the output of the first element (filename = NAME1)?
- Where are the other two elements in the JSON (filename = NAME2 & NAME3)?
- How can I convert the string into a JSON with the elements/contents of all the files in it?
My Logic App Workflow looks like this:

Ultimately, I want to add the whole JSON (with all the contents of the different files) to a HTTP PUT action.