title: Trying to get information from JSON file dynamically in a JavaScript function
body: <p>I found this function</p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function() {
      $('#container')
          .TidyTable({
              columnTitles : ['Column A','Column B','Column C','Column D','Column E'],
              columnValues : [
                  ['1','1A','1B','1C','1D','1E'],
                  ['2','2A','2B','2C','2D','2E'],
                  ['3','3A','3B','3C','3D','3E'],
                  ['4','4A','4B','4C','4D','4E'],
                  ['5','5A','5B','5C','5D','5E']
              ]
          });
  });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>And it gives me a table where I can click on the column titles and it sorts the respective column. Furthermore I have a json file with the following structure :</p>
  
  <pre><code>{ "results": [
     {
         "information1": "Some info1",
         "information2": "Some info2"
     },
     {
         "information1": "Some info1",
         "information2": "Some info2"
     }
  ]}
  </code></pre>
  
  <p>My question is:</p>
  
  <p>Can I dynamically parse this JSON file into the above function? So I imagine I have something like this:</p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function() {
      $('#container')
          .TidyTable({
              columnTitles : ['Information 1','Information 2'],
              columnValues : [ //Something dynamic has to happen here for all entries
                  ['information1', 'information2']
              ]
          });
  });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>I am not well traversed in this area so being specific would help me a lot. Thanks.</p>