How to keep the order of a Lua table with string keys?
snippet in lua

How to keep the order of a Lua table with string keys?

user2827

local queryindex = {"count", "query"}
local query = {}
query['count'] = 1
query['query'] = 2

for _,v in ipairs(queryindex) do
  print(query[v])
end