How can I use a control parameter inside a calculated field parseJson function

I have some json field named ‘json_field’ and a controlled parameter named ‘param_key’.

I’ve trying to extract the value of the parameter from the json, something like:
parseJson(json_field, '$.${param_key}')
or
parseJson(json_field, '$.' + '${param_key}')

Also tried concat and others, nothing seems to work, did anyone managed to do something like this?

HI @omriman12
do you get an error msg?
Did you check the value of ${param_key} and '$.' + '${param_key}'=
BR

Hi, thank you for your response.
The following code get a syntax error: '$.' + '${param_key}', same for the other option i gave.

If i just print the ${param_key}, it does give the expected value.(which indeed exists in the json field)

can you hardcore the path, to test?

Hi, yes I’ve tested and verified its working, the problem is with the parameter

Is it a single or multi value parameter?

Single value parameter

Hi @omriman12
could you solve it?
BR

Hi @omriman12 , @ErikG ,

parseJson function can take a dynamic path if you just use the parameter directly and have the full path (including the $.) in the parameter value.
ie - parseJson({jsonField},${jsonPathParam})
where value of jsonPathParam is $.xyz.abc etc

I have created an internal ticket for dev team to check into why it isn’t accepting a concatenated text as path.

Regards,
Arun Santhosh
Pr Quick Sight SA

@ArunSanthosh @ErikG
I was about to answer as well.
I’ve had a talk with AWS support and that’s exactly what I was told.
It’s a workaround, but defiantly not a clean solution.
I’ve also requested to address this as a feature request