How to sort a specific value “-” at bottom when sorting is in ascending order and to the top when it is in descending order?
I want to sort an array in ascending and descending order, also I want a specific “-” value at the bottom when the array is sorted in ascending order and want the same value to be at the top in array when it is sorted in descending order.
Sorting an array of objects by sort order priority
I want o sort an array of objects with a specific order given from a sort priority text.
Sorting a map by value properties: can these tests be shortened?
I’m trying to sort the map based on its value properties, such that all refCount
of 0
appear first in loadstamp
order; and, then, the other non-zero refCount entries appear in loadstamp order irregardless of the refCount.
javascript sorting strings starting with a number not working
I am trying to sort an object of strings, which would work with the normal sort function, but I am not able to get it working as the strings start with a number:
Sort list of time strings (e.g. 1 hour, 1 week) by length of time
I have a list of strings that I want to use as duration filter options. They are currently sorted alphabetically but I want them to be sorted by length of time. Is this possible?
Sort JavaScript object by key
I need to sort JavaScript objects by key.