how to store web activity result in a variable?

462 views Asked by At

i have a web activity through which i am executing a rest API(execute queries) this is a sample output of that:

        {

         "results": [
             {
             "tables": [
                 {
                 "rows": [
                       {
                       "[Value]": "2022-10-25T00:00:00Z"
                       }
                      ]
                  }
             ]
         }
]

i want to store the date value inside [Value] in a variable in adf

(variable value should be:2022-10-25T00:00:00Z)

but i am not able to do that because of square brackets this is what i have tried

"@activity('SQl validation').output.results[0].tables[0].rows[0].[value]"

but it give me error

Position 73 Unrecognized expression: value

please suggest how i can fix this

enter image description here

1

There are 1 answers

0
Saideep Arikontham On BEST ANSWER
  • Look at the following demonstration. I have the lookup which returns the following values.

enter image description here

  • To access the [companyId] attribute from this output array, I have used the following dynamic content (Using for loop just for demonstration):
@string(activity('myLookUp').output.value[item()]['[companyId]'])

enter image description here

  • So, you can use the following dynamic content instead:
@activity('SQl validation').output.results[0].tables[0].rows[0]['[value]']