Getting the key name in a pairs loop
🖼️ Rendering•Updated 2 days ago•0 views
for key, value in pairs(list) do print(key, value) end - the first return is the key ('val', 'bob').
How to get the key/name of each element when looping a keyed table
for key, value in pairs(list) do print(key, value) end - the first return is the key ('val', 'bob').