title: Return index of a table in Lua
body: <p>I've asked several people and searched Google but haven't found an answer for this; is there a way to return the index of a variable in a table in Lua?  I have a callback function that returns a variable that will always be part of a table.  In the callback it is just called something like "shape_one", but the shape itself will be one of a table of shapes and will look like this: Objects.shapes[4].</p>
  
  <p>If the "shape_one" has the value of Objects.shapes[4] then is there a way to return the 4?</p>
  
  <p>I hope I was clear enough.</p>