var newOptions = {"value1": "displaytext1",
"value2": "displaytext2",
"value3": "displaytext3"
};
var $el = $("#selectbox");
$el.empty(); // remove old options
$.each(newOptions, function(value,displaytxt) {
$el.append($("
").attr("value", value).text(displaytxt));
});
$el.empty() will remove all the option. To removing all the options but the first, you can use the :gt selector to get all the option elements with index greater than zero and remove them
$('#selectbox option:gt(0)').remove();
instead of $el.empty();