I believe to do it you use
table[index]
but I was wondering if there are other ways besides looping through the table?
You loop through a table if you don't know all indices.
For table indexing you generally use table[index]... this is also the "easiest" way.
Honestly, my favorite indexing is table.index
, but that only works with strings that doesn't start with numbers and has no spaces. Only when I have varying index I use the square brackets.