So I have come to find that I like the lodash _.sortBy method more so than the native Array.sort. Also it is worth pointing out that this is a collection method, so _.sortBy is a more robust method that brings a bit more to the table. In this post I will be writing about sorting using the _.sortBy method.
For a basic example of _.sortBy why not start off with just using it to sort an array of numbers. It does not get more basic than that does it.
To sort an array of numbers by numerical value, I just have to give the array of numbers to _.sortBy.
I can give a method as a second argument that can be used to define an expression for sorting.