Object Sort
A sorting function for objects

This is sorting function operates on arrays of objects and sorts them according to their object properties. Objects can be sorted in descending or ascending order.
In the example, dummy objects are created and put into an array. The resulting array is then sorted based on the properties of the objects. Function included: ObjectSort(arr, prop, dir). No return value is passed back, instead the input array is sorted directly and can be accessed as normal. |