Top "Sorting" questions

Sorting is the process of applying some order to a collection of items.

How do I sort a dictionary by value?

I have a dictionary of values read from two fields in a database: a string field and a numeric field. …

python sorting dictionary
Sort array of objects by string property value

I have an array of JavaScript objects: var objs = [ { first_nom: 'Lazslo', last_nom: 'Jamf' }, { first_nom: 'Pig', last_nom: …

javascript arrays sorting comparison
Sort a Map<Key, Value> by values

I am relatively new to Java, and often find that I need to sort a Map<Key, Value> …

java sorting dictionary collections
How to Sort a List<T> by a property in the object

I have a class called Order which has properties such as OrderId, OrderDate, Quantity, and Total. I have a list …

c# generics list sorting
How can I sort a dictionary by key?

What would be a nice way to go from {2:3, 1:89, 4:5, 3:0} to {1:89, 2:3, 3:0, 4:5}? I checked some posts but they all use the "sorted" …

python sorting dictionary
How to sort a dataframe by multiple column(s)

I want to sort a data.frame by multiple columns. For example, with the data.frame below I would like …

r sorting dataframe r-faq
Sort ArrayList of custom Objects by property

I read about sorting ArrayLists using a Comparator but in all of the examples people used compareTo which according to …

java sorting date comparator
Sorting an array of objects by property values

I've got the following objects using AJAX and stored them in an array: var homes = [ { "h_id": "3", "city": "Dallas", "state": "…

javascript arrays sorting
How to sort an ArrayList?

I have a List of doubles in java and I want to sort ArrayList in descending order. Input ArrayList is …

java sorting arraylist collections
How to Sort Multi-dimensional Array by Value?

How can I sort this array by the value of the "order" key? Even though the values are currently sequential, …

php arrays sorting multidimensional-array