Sorting an Observable Array in Knockout

后端 未结 4 850
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-30 12:13

I have an observable array in Knockout of person objects. I wanted to be able to sort the list of persons based on the last name. The problem is the list has a number of duplica

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-30 12:54

    You have to use Two sort to do this .In first sorting , sort according to persons last name And In 2nd Sorting first Search according to last name if more than two persons have same last name than sort these according to their first name at their location , using some Standard sorting Algorithm ....

提交回复
热议问题