Forum Discussion

Neka's avatar
Neka
Helper III
2 years ago
Solved

How to create an array from specific JSON key values for ForEach activity.

Hello, I have a JSON file with this structure from a CopyData activity step in my Data Factory pipeline:  "value": [{ "id": "123", "isReadOnly": false, //additional key-values }, { "id": "1234...
  • NandanHegde's avatar
    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 :