I know that this question has been asked many many times in this community but I hardly see the monitor of my laptop as I'm working for a long time. some help plz.
I want to sort this array of object to get the highest and the lowest value of all the given values that are being inserted to the array automatically.
var catesArrayHolder = new Array();
for(var chartGetter=1; chartGetter <= num; chartGetter++){
var catesArray = new Array();
for(var chartGetterArray=1; chartGetterArray <= series; chartGetterArray++){
idOfInput = "cate"+chartGetter+"_series"+chartGetterArray;
values = $("#"+idOfInput).val();
if(values == ""){
values = 0;
}
catesArray.push(values);
}
catesArrayHolder.push(catesArray);
}
this function does NOT work with me... it works with the one-dimensional arrays
catesArrayHolder.sort(function(a,b){return a-b});
I appreciate your help.