0

I have one activity output like this

{
    "firstRow": {
        "mapping": "{\"CHRSCRT\":\"CHRT\",\"CST\":\"CUSTOM\"}"
    }
}

an second activity output like

{
    "name": "FF",
    "value": "CST"
}

Now i want to take only one value from mapping table using the second variable.

I tried

@{json(activity('1stActivity').output.firstRow.mapping)}.@{variables('secondActivity')}}

I want output like CUSTOM

But i am getting output {\"CHRSCRT\":\"CHRT\",\"CST\":\"CUSTOM\"}.CST

Please help in this expression builder in ADF.

2
  • are you getting any error? Commented Oct 18, 2024 at 5:49
  • @RakeshGovindula no I am not getting error but I need desired result, how can I get that? Commented Oct 18, 2024 at 6:05

1 Answer 1

0

I want output like CUSTOM

To achieve your requirement, you can modify your dynamic expression without string interpolation like below.

@json(activity('1stActivity').output.firstRow.mapping)[variables('secondActivity')]

enter image description here

Here, it uses [] notation instead of . to specify the key from the secondActivity output.

Result:

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.