How can I ensure a stable .sort() order across all browsers? JavaScript
I have an array of objects, eg
[{
 thing: 'walker',
 value: 1
},
{
 thing: 'texas',
 value: 2
},
{
 thing: 'ranger',
 value: 2
}]
When sorting the array I sort them alternating asc/desc using:
 _sortNumber (key, dir) {
    return function(a, b) {
      if (dir) {
        // sort descending
        return b[key] - a[key];
      }
      else {
        // sort ascending
        return a[key] - b[key];
      }
    }
  };
array.sort(this._sortNumber('value', Boolean));
However, the order of texas and ranger seem to randomly change. I believe due to the fact that they are the same number, however, I would like it to be consistent. 
How can I ensure consistency; or sort on a secondary value (eg thing alphabetically), in order to ensure I always get the same sort result?
 
     
     
     
    