Dynamic path to params

Hello,

O try to figured out how to make this work.

value =  self.getSibling("EmbeddedView").props.params.Score_Parameter 
self.getSibling("EmbeddedView").props.params.S_2639 = 6

however, the last bit “S_2629” I would like to get dynamically from variable as it need to be dynamic.

I tried simple:

value =  self.getSibling("EmbeddedView").props.params.Score_Parameter  
self.getSibling("EmbeddedView").props.params. + value  = 6

But obviously no luck.

Thanks for your help.

Best regards
Pawel

use [ ]

value =  self.getSibling("EmbeddedView").props.params.Score_Parameter
self.getSibling("EmbeddedView").props.params[value] = 6

image

Thanks victordcq

It’s working perfect.

Is there a similar way to do this in expressions.

{view.params.S_2369}
to be 
{view.params.{this.meta.name}}

For expressions, you can use the property function.

1 Like

Thank you guys for your help.