···1616export function parseCSV(csvData) {
1717 return Papa.parse(csvData, { header: true });
1818}
1919+2020+/**Convenience function to fetch CSV data from the provided Google Sheets URL
2121+ * and parse it into an array of JSON objects, all in one.
2222+ *
2323+ * Combines getSheetsCSV and parseCSV.
2424+ */
2525+export async function importCSVDataAsJson(url) {
2626+ const csv = await getSheetsCSV(url);
2727+ const json = parseCSV(csv);
2828+ return json;
2929+}