I found a great method to sort an array of objects based on one of the properties as defined at:
Sort array of objects by string property value in JavaScript
You may also want to have a look at thenBy.js: https://github.com/Teun/thenBy.js
It allows you to use the standard Array.sort, but with firstBy().thenBy().thenBy() style.