You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Looping through request with JSON array and writing to a file

edited Apr 18, 2025 12:31PM in Integration 22 comments

Summary:

Hi friends,

OIC noob here. I have a request that takes a JSON emp array and in the for loop I am writing each row to the file as I loop through the json array. This isn't working though. Not sure what I am doing wrong.

When the file is written only one record is being written. I want both the records to be in the file. Is this possible? The file contents are

abc,123,manager

Payload is

[
{
"emp":"abc",
"num":"123",
"title":"manager"
},
{
"emp":"ced",
"num":"22",
"title":"director"
}
]


Orchestration is as follows

And mapping as below

Content (please ensure you mask any confidential information):

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!