I’d like to get the values from an indexed table and set those values as the keys in another table. For example,
[lua]
array = {“dave”,“robin”,“michael”,“becca”}
dictionary = {}
for i, #array do
dictionary.array[i] = {}
dictionary.array[i].aNewKey = “whatever”…array[i]
dictionary.array[i].anotherNewKey = “something else”
end
[/lua]
I want to then be able to access the data in like manner:
[lua]
print (dictionary.dave.aNewKey)
[/lua]
I know this should be simple, but it’s the end of the day and I think I’m having a brain fart. Any ideas on how to create a dictionary in this way? [import]uid: 120914 topic_id: 36857 reply_id: 336857[/import]