If I have an associative array
}
I can easily retrieve any of the array members by key:
BrightScript Debugger> print categories.key1
test
west
best
is there any way to stick “key1” into a variable like;
keyvar=key1
print categories.keyvar
so I can call a function with the key as string and get back the member associated with that key?
in the meantime I’m using an if-then like this:
if key=“key1” : print categories.key1
if key=“key2” : print categories.key2
if key=“key3” : print categories.key3
and so on, but this presupposed that the key’s are known to the current function
