When you add something to a table, you usually add a value, right? But what if I wanted to add a key to that value when I add it to a table? Is this possible and if so how do I do it?
✓ ANSWER ACCEPTED
Adding a key to a table?
1 answer
✓ Accepted answer
This is how you do it:
local table = {}
table["Zombie"] = "I eat brainz"
The first part is simply indexing the key that you want to index. It creates a new value if the key does not exist. Then it sets the following value to be it's value.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
For example table = {['index'] = value}