Help referencing a variable using a value from a table

I am trying to create a card deck system, where I can input current stat values, and return all cards which you meet the requirements for. In doing my current method, I need to call a variable using a string value from inside a table. Is there a way to do this?
Current code:


My attempt is in line 22

Do this and follow what the comments say

YourTable[YourStringHere] -- this is your variable when you try to call a variable using a string

--[[example:
Table = {value = "anyvalue"}

print(Table["value'])
]]

i assume you are trying to index a variable using a string so you just do

YourTable[YourStringHere]