SortedPairs
Example
Example of usage.
for id, text in SortedPairs({"e", "b", "d", "c", "a"}) do
print(id, text)
end
print("---")
for id, text in SortedPairs({
e = 1,
b = 2,
d = 3,
c = 4,
a = 5
}) do
print(id, text)
end
Output:
1 e
2 b
3 d
4 c
5 a
---
a 5
b 2
c 4
d 3
e 1