I have the following table defined which consists of tables defined under a string index as such:
local myTable = {
["str-1"] = {
id = 1,
value = "val"
},
["str-2"] = {
id = 2,
value = "val",
},
["str-3"] = {
id = 3,
value = "val",
}
}
for i, table in ipairs(myTable) do
print(i)
print(table)
end
I'm attempting to loop through the contents of the table however the print() statements are not giving an output? I have placed a print statement to print both the current index of the loop and the table at that position.