willy sepulveda
willy sepulveda

Reputation: 149

Extract value from array in datafactory

how can I extract the value of the Name element from the following array in datafactory:

{ "variableName": "PiQuality", "value": { "Value": { "Value": { "Name": "vaCurrent" } } } }

Thankyou so much.

Upvotes: 2

Views: 2971

Answers (1)

Martin Esteban Zurita
Martin Esteban Zurita

Reputation: 3209

So I just tried this, created a string variable called "try" and set it with your example json. Then I set a second string variable with the following value:

@json(variables('try')).value.Value.Value.Name

So this first converts the string to a json, and then navigates the properties until it gets to the one you are looking for.

Debug output

Upvotes: 1

Related Questions