I would do something like this:
$.each(temp, function(key, value) {
$select.append(`<option value="${key}">${value}</option>`);
});
JSON structure would be appreciated. At first you can experiment with find('element') – it depends on JSON.
I would do something like this:
$.each(temp, function(key, value) {
$select.append(`<option value="${key}">${value}</option>`);
});
JSON structure would be appreciated. At first you can experiment with find('element') – it depends on JSON.