You can also use the jquery add () function.
For instance,
var options = ["0":{"description":"Select an item"}, "1":{"description":"item 1"}]; var dropdown = $("#dropdown_id")[0]; $.each(options, function(i, item) { var option = new Option(item.description, i); if ($.browser.msie) { dropdown.add(option); } else { dropdown.add(option, null); } });
source share