Does anyone know of a technique to programmatically create an HTML select list including options using JQuery?
I think it's simpler.IMHO.
arr.map(x => ($("YOUR SELECTOR").append(`<option value="${x}">${x}</option>`)));
If you have already <select> list somewhere in DOM, reuse it and make it empty from previous user interactions...
// Call existing list, chain empty()
var my_list = $("#my_list").empty();
// Build list
$(my_arr).each(function() {
my_list.append($(<option>").attr(\'value\',this.item_id).text(this.item_name));
});