Creating select list with script
<p>I have got this far with my coding:</p>

<pre><code>  success: function(data) {
    $.each(data, function(item){
      if (item=="") {
        $(select_element).append($(document.createElement("option")).attr("value",   (item)).html(data[item]));
      } else {
        $(select_element).append($(document.createElement("option")).attr("value",(item)).html(data[item]+" "));
      }
</code></pre>

<p>'item' is an object with two attributes, description and id. Created select list works basically just find, but it returns the whole object now. Can I modify the createElement function so that id would be the returnable itemValue and description itemLabel? I'm newbie.</p>
