Table inserting

How would you insert something like this (into a table):

["Nums"] = {1, 2, 3}

So that you would get this outcome.

local Table = {
	["Nums"] = {1, 2, 3}
}

(Sorry if it’s very vague but I can’t explain it any better).

To add a new Dictionary( which it what your Table is called) value, you would do something as simple as this:

Table["Test"] =  {6, 4, 3}

with that this is the outcome:


local Table = {
	["Nums"] = {1, 2, 3},
   ["Test"] =  {6, 4, 3}
}

2 Likes

Thanks! A lot simpler than I thought.

I have another question, how would I completely remove a dictionary from the table?

(Never mind, I figured it out).

1 Like