If the locale in your system is set correctly then you can use
localeCompare method instead of greater-than operator to compare the strings – this method is locale aware.
More Related Contents:
- Sort out array of object using its value [duplicate]
- How to sort an array of objects by multiple fields?
- How may I sort a list alphabetically using jQuery?
- What is the stability of the Array.sort() method in different browsers?
- Console.log showing only the updated version of the object printed
- Sort an array of object by a property (with custom order, not alphabetically)
- using lodash .groupBy. how to add your own keys for grouped output?
- Sort an array based on another array of integers
- How to sort an array based on the length of each element?
- jQuery sort elements using data id
- Using Canvas to animate a sorting algorithm in JS
- Reordering arrays
- How to allow Web Workers to receive new data while it still performing computation?
- Sorting of jqGrid (v4.1.2) treegrid not working with Ajacency Model
- Sorting an array of objects in Chrome