I currently have a problem, I have a submenu with the following code:
load_sub_menu_disciplines: function() {
$.ajax({
headers: {
"Accept": "application/json; charset=utf-8",
"Content-Type": "application/json; charset=utf-8"
},
type: 'GET',
url: 'api/catalog_system/pub/specification/fieldvalue/22',
success: function(data) {
$.each(data, function(i, ele) {
if (ele.IsActive) {
$('#disciplinas .box-link .nav').append($('<li/>').append($('<a/>').attr('href', '/' + ele.Value + '?map=specificationFilter_22&O=OrderByReleaseDateDESC').text(ele.Value)))
}
});
$('#disciplinas a:empty').remove();
},
error: function(error) {
console.log(error);
}
});
And I need you to be sorted alphabetically, but I have no idea how to do it. I understand that I should do it with a Sorting function, but I have no idea how to unify the code. Im noob in js -.-