title: Passing nested tables from Lua to C
body: <p>I have the following nested table defined in Lua. I need to pass it into my C++ program so that I can accurately read it's values. I know I can pass a single table to Lua using the       </p>
  
  <pre><code>lua_getglobal(L, "parameters") 
  </code></pre>
  
  <p>function. But in this case since it is nested, how can I deal with it?</p>
  
  <pre><code>parameters = 
  { 
       fuel = 100,         
       damage = 250,
       maxspeed = 250,
       levels = 
       {
           { 
               fuel = 200,
               damage = 600, 
               maxspeed = 300,                 
           },
           { 
               fuel = 300,
               damage = 750,
               maxspeed = 400, 
           },                    
       }
  }
  </code></pre>