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 ascending
and descending
. We'll sort an array of objects by multiple fields and the code will be readable and dead simple to change.
Excellent one! Thank you so much Andrew for the great series :-)
Sen,
Glad you are enjoying them!