How to insert named value into a table?

I am struggling on how I can insert named values into tables. Here’s why I’m trying to do.

I want to insert a value of, let’s say, 10, into a table, but also give it a name so the table looks like this:

{
  ["Number"] = 10
}

Instead of this:

{
  [1] = 10
}

I’m not sure if this is possible with table.insert because I’ve tried it before and it didn’t work. At the same time I don’t know much about table.insert so I can’t say for sure. Any help would be much appreciated. Thanks in advance!

Have you tried the following:
Table[Number] = 10

(This would work with dictionaries, not arrays)

1 Like

Ah, I didn’t expect it to be this simple. I was expecting there to be some crazy function or something. Thank you!

2 Likes