I have an array of the following objects:
[{name : "Mariah" , quantity: 2},
{name : "Vincent" , quantity: 1},
{name :"Albert" , quantity: 1},
{name : "Patrick" , quantity: 1},
{name : "Vincent" , quantity: 2}]
I would like to sort this list based first on the quantity field and then alphabetically based on the name field Something like that
[{name :"Albert" , quantity: 1},
{name : "Patrick" , quantity: 1},
{name : "Vincent" , quantity: 1},
{name : "Mariah" , quantity: 2},
{name : "Vincent" , quantity: 2}]