I created dropdown and get value from the response, but here is the issue, reverse.config have two value:1 ,2. now I have to print 2, 1 which I am trying to print, I tried using reverse(), but its not working.
jQuery.each(response.config, function (index,value) {
var select = value.label + '<select class="configurable" name="' + index + '" >';
jQuery.each(value.values, function (key, opt) {
select += '<option value="' + opt.value_index + '">' + opt.label + '</option>>'
});
select += '</select>';
jQuery("#newProduct").append(select);
});