title: How to populate unordered list from array with javascript?
body: <p>I'm currently creating an app with Phonegap. I want to loop through a form of array to create an unordered list with this format where url and title are the stored values:</p>
  
  <pre><code>&lt;li&gt;&lt;a href="[url]"&gt;[title]&lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <p>I'm a bit new with this way of developing apps, and I'm not really sure the best way to store this data in the root of my app. I guess I could've made an JS array, but I want to keep it saved in a seperate file. I therefore made a json file:</p>
  
  <pre><code>{
    "title": "thisistheurl.com",
    "title": "thisistheurl.com"
  }
  </code></pre>
  
  <p>How am I able to create this list based on my data from my local json file? I tried this one without any luck:</p>
  
  <pre><code>$.getJSON( "links.json", function( data ) {
                    var items = [];
                    $.each( data, function( key, val ) {
                      $("linkList").append( "&lt;li id='" + key + "'&gt;" + val + "&lt;/li&gt;" );
                    });
  });
  </code></pre>