title: Parsing json with jquery to build a dynamically populated select
body: <p>i have to build a dinamically populated select but i'm pretty noob to this and i've encountered some difficoulties with json parsing...</p>
  
  <p>my code is</p>
  
  <pre><code>cb="";
  $('#datepicker').blur(function() {
      cb='&lt;option value="0"&gt;&lt;/option&gt;';
      if ($('#datepicker').val() != "") {
          $.getJSON("json.php?t=cb&amp;id=" + $("#datepicker").val(), function(data){
  
              *some magic*
  
              *for each pair of element in json*
                   cb+='&lt;option value="'+data.id+'"&gt;'+data.description+'&lt;option/&gt;';
  
          });
      }
      $('#select').html(cb);
  });
  </code></pre>
  
  <p>sadly without magic tricks :(</p>
  
  <p>the json i have to parse is like</p>
  
  <pre><code>[{"id":5423,"description":"sometext1"},
  {"id":4132,"description":"sometext2"}
  {"id":5534,"description":"sometext3"}
  ...
  ]
  </code></pre>
  
  <p>but i don't know how to do it...
  can you help me?</p>
  
  <p>sorry for my bad English :D</p>