I have an array of objects:
array = [
{
name: 'fever',
possibility: '20%',
},
{
name: 'hiv',
possibility: '25%',
},
{
name: 'heart-attack',
possibility: '20%'
},
{
name: 'covid',
possibility: '40%',
},
]
I want to sort out the array of objects using its possibility. The object with higher possibility will be on top and if two or many objects have the same possibility then it will be sorted alphabetically. How can I do that?