![](https://secure.gravatar.com/avatar/c10a9794cde725cb719c118dcc00e966.jpg?s=120&d=mm&r=g)
30 Jul
2016
30 Jul
'16
7:04 a.m.
If the requirement is to iterate on a table having the keys, values sorted by key (assuming the keys can be sorted), there are ways to do this. Please see http://lua-users.org/wiki/SortedIteration for an example (this just replaces pairs(t) with orderedPairs(t)). Hope this helps Joseph De : Schmitz Thomas A.