.sortBy(key,direction)
Description
The sortBy method takes in an array or objects as input and returns the array but sorted by a key in its items.
Parameters
Key is the key that you want to sort the objects inside the array
Direction can either be empty, "ascending" or "descending"
Usage On Arrays
Last updated