concatenate variable names

For do the same with a variable called 123456 (ignoring the : that is a typo for sure…)
{
:local variables {“hello”=“123”}
:put “current content of hello variable is >$($variables->“hello”)<”
:local newvarname (($variables->“hello”) . “456”)
:put “new variable name is >$newvarname<”
:set ($variables->$newvarname) “test”
:put “value of >$newvarname< is >$($variables->$newvarname)<”
}

current content of hello variable is >123<
new variable name is >123456<
value of >123456< is >test<

As I already write: I do not use 123 on example for avoid confusion on variable name that is one number.


Whatever happens, I already explained in 2021 how to do it in an unnecessarily complicated way…
http://forum.mikrotik.com/t/concatenate-values-to-create-variable-name/151793/2