console.log(fruits.sort((a, b)=> {
if (a.colA === b.colA){
return a.colB < b.colB ? -1 : 1
} else {
return a.colA < b.colA ? -1 : 1
}
}))
/*
> [{colA: "apple", colB: "granny smith"},
{colA: "apple", colB: "red delicious"},
{colA: "orange", colB: "blood"},
{colA: "orange", colB: "clementine"},
{colA: "orange", colB: "navel"},
{colA": "pear", colB: "green anjou"},
{colA: "pear", colB: "red anjou"}]
*/