Get variable value from variable

Hi! I want to take an array of values ​​depending on the current state.

example of variables:
test1 = 1,2,3
test2 = 4,5,6

test3 = PROD : $test1, STG : $test2

is it possible to get it from test3. something like ${test3:value[2]}?

thanks for the answer. But this is not quite the same…

in fact, I need to place the object in different variable values:

test3 = PROD : {name :“prod”, value:1} , STG : {name :“stg”, value:2}

And get the value ${test3}. value.

why can’t you use an object as a value in grafana?