title: lua: retrieve list of keys in a table
body: <p>I need to know how to retrieve the key set of a table in lua.  for example, if I have the following table:</p>
  
  <pre><code>tab = {}
  tab[1]='a'
  tab[2]='b'
  tab[5]='e'
  </code></pre>
  
  <p>I want to be retrieve a table that looks like the following:</p>
  
  <pre><code>keyset = {1,2,5}
  </code></pre>