title: String to Table in Lua
body: <p>I am using LuaSocket and http.request to call a remote PHP script that generates a Lua table and outputs it to the browser.</p>
  
  <p>When I store the http.request response in a variable it's a string, which renders the table unusable in my Lua code.</p>
  
  <p>For example:</p>
  
  <pre><code>eventData = http.request("http://www.example.com/events.php")
  print( eventData )
  
  --print outputs this "string", that is really a Lua table that PHP generated
  months={
      'January',
      'February',
      'March',
      'April',
      'May',
      'June',
      'July',
      'August',
      'September',
      'October',
      'November',
      'December',
  }
  </code></pre>
  
  <p>If I try calling months[4], for example, it errors out with "attempt to index global 'months' (a nil value)".
  How can I cast that string as a usable table?</p>
  
  <p>Thanks!</p>