I just realized that I have a need to sort a JSON array with multiple properties for each node in the array. I found this howto very useful. All I needed was to provide a comparison function that knows how to compare my complex data structure, plugged it into the sort algorithm to sort the array, and I was done. 🙂