I am trying to sort an array with objects based on multiple attributes. I.e if the first attribute is the same between two objects a second attribute should be used to comap
Simple Example from http://janetriley.net/2014/12/sort-on-multiple-keys-with-underscores-sortby.html (courtesy of @MikeDevenney)
Code
var FullySortedArray = _.sortBy(( _.sortBy(array, 'second')), 'first');
With Your Data
var FullySortedArray = _.sortBy(( _.sortBy(patients, 'roomNumber')), 'name');