title: Parse JSON File for Option in HTML select box
body: <p>I'm doing PhoneGap project for my company.. Here goes on..
  I have json file named city.json</p>
  
  <pre><code>[{"CityID":1,"CityName":"Magelang"},{"CityID":2,"CityName":"Jayapura"},{"CityID":3,"CityName":"Aceh"}]
  </code></pre>
  
  <p>I only want to get this city data for the option in my html select box named "city".. I had searched on the web, but couldn't find any solution for this JSON pattern.. I have tried this code, but it didn't work..</p>
  
  <pre><code>$(document).ready(function(){
              $.getJSON('city.json', 
              function(data){
                  var html = '';
                  var len = data.length;
                  for (var i = 0; i&lt; len; i++) {
                      html += '&lt;option value="' + data[i].CityID + '"&gt;' + data[i].CityName + '&lt;/option&gt;';
                  }
                  $('#city').appendTo(html);
              });
          });
  </code></pre>
  
  <p>I have imported the jquery javascript plugin too.. I really have no idea to make it works..
  Please help me.. </p>