Let’s say I’m making a for loop that loops through a dictionary. How do I find the name of something in that dictionary?
For example:
local dictionary = {
["Player1"] = 219
["Player2"] = 285
["Player3"] = 295
["Player4"] = 188
}
for i, v in pairs(dictionary) do
print(???)--How would I find the name player1, player2, etc? I tried doing v, but it only prints out the number it is(as in order). Like 1, 2, 3, etc.
end