title: How can I insert a value to a table thats inside a table
body: <p>I am just testing out my knowledge and I want to know how I can insert a string value like a name into a nested table.</p>
  
  <p>I have tried <code>table.insert()</code> but I cant seem to insert into the nested table</p>
  
  <pre class="lang-lua prettyprint-override"><code>whitelist = {
      owners = {"Owner","AnotherOwner","John"},
      users = {"Jack","Jill","username"}
  }
  
  table.insert(whitelist,2,"Q") --What I want to do
  --[[for index,table in pairs(whitelist) do 
      print(index)
      for key,value in pairs(table) do
          print('\t',value)
      end
  end
  (I want to use this later after inserting to see if it works)
  ]]--
  </code></pre>
  
  <p>I expected it to print out both tables with an added value of <code>"Q"</code>into <code>users</code> but I get an error: </p>
  
  <blockquote>
    <p>Position out of bounds</p>
  </blockquote>