lodash orderby method as an option for sorting collections
The lodash orderby method is one of several options in lodash for sorting collections mainly arrays, but also objects in general because it is a collection method rather that just an array method. It works more or less the same way as the lodash sortby method, but it allows for setting the sort orders ( ascending or descending ) of each method that is used to sort the collection object.
However I often just make use of what there is to work with in just native javaScript by itself when it comes to sorting arrays and object keys in general. With that said there is also using just the plain old sort array prototype method when it comes to working with arrays. So this will be a quick post on using the lodash order by method, as well as some vanilla javaScript alternatives.