I don't know exactly how to explain it, but this is what I want. I have an array of domains also containing a health value and this is how I want to sort it. If the health value is unknown, currently healthKnown is set to false and health is set to 95.
aaa.com - 100
bbb.com - 100
ccc.com - 100
aaa.com - 90
bbb.com - 90
ccc.com - 90
aaa.com - (unknown)
bbb.com - (unknown)
ccc.com - (unknown)
(there wouldn't be any duplicates though)
In this, each set of domains with the same health are alphabetically sorted and unknown health is last. The array looks like this.
[
  {
    "name": "example1.com",
    "details": ...,
    "health": 100,
    "healthKnown: true
  },
  {
    "name": "example2.com",
    "details": ...,
    "health": 100,
    "healthKnown: true
  }
]
 
    