Call variable content by using another variable

Hey Guys,
another newbe question here:

i want to call the content of a var by dynamically creating the var-name:

e.g.:
i have

:local a “foo”
:local foo “aaa”

Now i’m trying to get the content of $foo by using $a. But my attempt:

:put $($a)

does not work, and i can’t figgure out how to do it. :frowning:


Every help is very much appreciated!

J.