Forum Discussion
How to create an array from specific JSON key values for ForEach activity.
- 2 years ago
Hey,
The output Value is by default an Array.
You can iterate over the Copy activity output directly via For each and get the ID details per iteration itself.
where parameter Test value is :
[{ "id": "123", "isReadOnly": false }, { "id": "1234", "isReadOnly": false }]
You can use For each activity to iterate over the value directly
within for each, use Set variable activity to get the ID value
Output :
Hey,
The output Value is by default an Array.
You can iterate over the Copy activity output directly via For each and get the ID details per iteration itself.
where parameter Test value is :
[{ "id": "123", "isReadOnly": false }, { "id": "1234", "isReadOnly": false }]
You can use For each activity to iterate over the value directly
within for each, use Set variable activity to get the ID value
Output :
Thank you for answering my question, but how do I make the Default Value in the Parameters my Id key from my JSON file? In your example, it looks like the JSON file has been copy pasted into default value but since I'm creating a new JSON file everytime I run copy data, how would I make sure that that new JSON file is always used?