JSFiddle - React, Tailwind, and code Playground

JavaScript

var myArray = [
    
    {group: 'B', title: 'Title 2'},
    {group: 'C', title: 'Title 3'},
    {group: 'A', title: 'Title 4'},
    {group: 'A', title: 'Title 5'},
    {group: 'B', title: 'Title 6'},
    {group: 'C', title: 'Title 7'},
    {group: 'A', title: 'Title 1'}
];

myArray.sort(function(a,b) {
    var res = a.group.localeCompare(b.group);
    if (res != 0) return res;
    return a.title.localeCompare(b.title);
})

document.body.innerHTML = '<h3>Sorted Array</h3>' +
    '<pre>' + JSON.stringify(myArray, null, 4) + '</pre>';