title: How to read tables written in a file on lua
body: <p>I am trying to make an API for the computercraft mod that you can give an item name and it'll look up a dictionary and craft the item for you. While I have gotten it to craft the item after you give it the array. I am having trouble with a way to upload the recipes from a separate file.</p>
  <p>I have a few files that each has a bunch of 2-dimensional tables that I want another program to import, one table per line. so basically</p>
  <p>file1</p>
  <pre><code>itemA = {{&quot;a&quot;,&quot;b&quot;,&quot;c&quot;},{&quot;d&quot;,&quot;e&quot;,&quot;f&quot;},{&quot;g&quot;,&quot;h&quot;,&quot;i&quot;}}
  itemB = {{&quot;j&quot;,&quot;k&quot;,&quot;l&quot;},{&quot;m&quot;,&quot;n&quot;,&quot;o&quot;},{&quot;p&quot;,&quot;q&quot;,&quot;r&quot;}}
  </code></pre>
  <p>file2</p>
  <pre><code>itemA = {{&quot;a&quot;,&quot;b&quot;,&quot;c&quot;},{&quot;d&quot;,&quot;e&quot;,&quot;f&quot;},{&quot;g&quot;,&quot;h&quot;,&quot;i&quot;}}
  itemC = {{&quot;j&quot;,&quot;k&quot;,&quot;l&quot;},{&quot;m&quot;,&quot;n&quot;,&quot;o&quot;},{&quot;p&quot;,&quot;q&quot;,&quot;r&quot;}} 
  </code></pre>
  <p>What I want is when I read this by line you get a table structure that is basically</p>
  <pre><code>recipies = {itemA = {{&quot;a&quot;,&quot;b&quot;,&quot;c&quot;},{&quot;d&quot;,&quot;e&quot;,&quot;f&quot;},{&quot;g&quot;,&quot;h&quot;,&quot;i&quot;}}, itemB = {{&quot;j&quot;,&quot;k&quot;,&quot;l&quot;},{&quot;m&quot;,&quot;n&quot;,&quot;o&quot;},{&quot;p&quot;,&quot;q&quot;,&quot;r&quot;}}}
  </code></pre>
  <p>There also needs to be an identical recipe check in case if multiple dictionaries carry the same recipe for the same item</p>
  <p>I don't have much experience with string manipulation in any language, But I don't know how to remotely get around this in Lua.</p>