How to dynamically code table keys

I want to create a table like this:

key1 = "some value"  
key2 = "another value"  
...  
key100 = "yet another value"  

(note, the values are unimportant for this question)

So, I have about 100 keys which need to be named Key1 --> Key100. This will correspond to settings that I’m saving in a file. I also need to be able to read this back again and set the values of Key1 --> Key100

I ideally want to use a loop instead of hardcoding all 100 lines (yuk).

Is this possible in Lua?
[import]uid: 8353 topic_id: 3187 reply_id: 303187[/import]

Is something like the following what you are looking for?

[lua]t={}
for i=1,100,1 do
t[“key”…i…""]=“valuewannabe”
end

function readSettingsAtLine(x)
–json stuff
return string
end
for i=1,100,1 do
t[“key”…i…""]= readSettingsAtLine(i)
end[/lua]
[import]uid: 7356 topic_id: 3187 reply_id: 9439[/import]

That’s exactly what I needed - thanks. [import]uid: 8353 topic_id: 3187 reply_id: 9466[/import]