I know I can do this to get each Key and Value in an array, but how do I only get the first?
A dictionary kind of array.
local Array = {
["Entry1"] = {1,2,3},
["Entry2"] = {4,5,6}
}
for k, v in pairs(Array) do
return k, v
end
I need it to only return the first key and value

3 comments
Arrays and dictionnaries are complete opposites. Besides, there's no such thing as an 'array' or a 'dictionnary' in Lua. Those are just concepts people came up with. You're thinking of a 'table' with string keys.
You could just do Array["Entry"..num] if you're naming all of 'em consistently like that.
Well the entry names are random so I wouldn't know the string to index them with.