Skip to content
Loading
Thanks
0
  • Reshma Bhalekar
    0
    ok.
     
    I tried to print in console.log then also it shows all data in employee array but after that its get empty because when i tried to print console.log(employees.length) it is showing 0
     
    I think after sort it gets empty or anything other..
    0
  • Manav Pandya
    0
    Hello
     
    Try to remove below code and place functions code inside calling method :
     
    remove this -> SortArray(employees);
     
    And place the code inside function inside body where you removed above code
     
    Thanks
    0
  • Sagar  Pandurang Kap
    -1
    Hi,
    Refer below links :-
     
    https://www.w3schools.com/jsref/jsref_sort.asp
    https://stackoverflow.com/questions/5503900/how-to-sort-an-array-of-objects-with-jquery-or-javascript
     
    Hope it helps....
    -1