💬

Community answer

Collected from the ACE community Discord archive around 2023-07-21. It may be informal or outdated — anyone can edit this page to improve it. Original discussion

Getting the key name in a pairs loop

🖼️ RenderingUpdated 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').

Was this article helpful?

See More

Discussion(0)

No comments yet. Be the first to ask a question!

Have a question? Sign in to join the discussion.