From ad8999877c90ac3502414ac45e1bbbc297988d2e Mon Sep 17 00:00:00 2001 From: Gaspard Jankowiak Date: Fri, 5 Jun 2026 12:50:41 +0200 Subject: [PATCH] sort applicants by last name in the CSV file --- content.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content.js b/content.js index 8593ca5..f712e3b 100644 --- a/content.js +++ b/content.js @@ -211,7 +211,7 @@ function createApplicantsCsv(applicantDetailsList) { CSV_FIELDS.join(",") ] - applicantDetailsList.forEach((applicantDetails) => { + applicantDetailsList.sort((app1, app2) => app1.last_name.localeCompare(app2.last_name)).forEach((applicantDetails) => { const values = CSV_FIELDS.map((fieldName) => escapeCsvValue(getApplicantCsvValue(applicantDetails, fieldName))) rows.push(values.join(",")) })