employees.sort((a, b) => {
let fa = a.firstName.toLowerCase(),
fb = b.firstName.toLowerCase();
if (fa < fb) {
return -1;
}
if (fa > fb) {
return 1;
}
return 0;
});
Code language: JavaScript (javascript)