Basically what I have been trying to do is get all the keys in a dictionary and what their value is, however, those dictionaries are in an array so I don't know how to retrieve them from the for loop in ipairs.
local codes = {}
codes[1] = {
Code = "TestCode",
Expires = false
}
codes[2] = {
Code = "ExpiringCode",
Expires = true,
ExpYear = "2020",
ExpMonth = "11",
ExpDay = "8",
ExpTime = "13:08"
}
for key, value in ipairs() do --What to put in pairs()?
print(key.. ": ".. value)
end
I have already tried to put codes[2] in the for loop and it did not work.
Thank you for taking the time to read this, it is very much appreciated! :D

1 comment
You need to do a double for loop. So for i,v in pairs(value) inside of the original for key,value in pairs.