Key value pairs in tables

Can you create a table with key value pairs, such as {“name”: value, “name2”: value2}.
I want to be able to index a table using the key “name,” rather than have to remember the numerical index of each value in the table. This works fine for a small table, but I plan on having a huge table I will need to index through, so having key value pairs would be a huge help

Lua is easy for this!

tab = { myName = "Jordan" }

print( tab["myName"] == tab.myName )

tab2 = { ["myName"] = tab.myName }