I am using google script and I have an array like so
[
{RowOfEnemy=0.0, BonusType=, Alive=true, TotalHealth=4350000.0, Matched=false},
{Alive=true, BonusType=, Matched=false, TotalHealth=3900000.0, RowOfEnemy=1.0},
{Matched=true, Alive=true, TotalHealth=3780000.0, RowOfEnemy=2.0, BonusType=MELEE}
]
I want to sort on Matched and then TotalHealth both descending. I know how to sort on a single element but I am stumped on sorting 2 elements. Any help would be appreciated.