Indexing
Indexing reads a particular value from a collection or text. Choose a position for a sequence and a key for a dictionary.
Look up a key at runtime
The variable key holds the name to look up.
player = {health = 90}
key = 'health'
print(player[key])
90
Brackets let the program decide which field to read. See get() to provide a fallback.