I have an array of items.
var myArray = [
{group: 'A', title: 'Title 1'},
{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'}
];
I would like to sort array first by group, and inside a group sort by title (alphabetically).
I know that I could create different arrays for every group and then sort them, but I think that this should be done in one .sort function.