Extract array from Json output

braxx 441 Reputation points
2021-04-14T17:21:42.927+00:00

I am struggling how to extract an array from Json output.

Json Output from my Lookup activity:

{  
    "count": 3,  
    "value": [  
        {  
            "Prop_0": "6"  
        },  
        {  
            "Prop_0": "7"  
        },  
        {  
            "Prop_0": "8"  
        }  
    ],  
    "effectiveIntegrationRuntime": "LinkedHostedIntegrationRuntime(HostedIntegrationRuntimeCDH01)",  
    "billingReference": {  
        "activityType": "PipelineActivity",  
        "billableDuration": [  
            {  
                "meterType": "SelfhostedIR",  
                "duration": 0.016666666666666666,  
                "unit": "Hours"  
            }  
        ]  
    },  
    "durationInQueue": {  
        "integrationRuntimeQueue": 4  
    }  
}  

Array wchich I expect to be my output. I thougt of using SetVariable activity to achieve it:
[6,7,8]

How to create an expresion in Set Variable to get [6,7,8]?
This is what I tried but not working for me

@activity('Get List of Retailers').output.value  

The purpose of doing this is to pass the array from Variable to a copy activity. In a copy activity I have a source data set as REST, where I am connecting API to retrive data. API expects a parameter which is my array.

Here is how my pipeline looks like
87829-capture1.png

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,740 questions
0 comments No comments
{count} votes

Accepted answer
  1. Nasreen Akter 10,791 Reputation points
    2021-04-14T19:12:17.26+00:00

    Hi @braxx ,

    Before the CopyActivity, you can have a ForLoop to loop through all the values from the LookupActivity and append to a variable. And finally use that variable as a parameter in the CopyActivity. Thanks!


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.