Sort an Array of Objects by Multiple Fields with Ramda's sortWith
Sorting an array of objects by multiple fields can be tricky. Even worse, the code can be tough to follow and making changes in the future is complicated by conditional logic in the sorting function. In this lesson we'll see how to simplify this using Ramda's
sortWith along with
descending. We'll sort an array of objects by multiple fields and the code will be readable and dead simple to change.