How would I add a new variable to a dictionary with a script?

So I know how to add a simple object to a table like so:

local t = {}
table.insert(t, "some value thing")

this will set the table to: local t = {“some value thing”}
but how could i do something like this?

local t = {
["some value thing"] = 123
}

NEVERMIND!
it seems my brain was not functioning properly

right when I closed the page of the devforum i realised i could just do
t["some value thing"] = 123

1 Like