// struct-staff.mjs let staffs = new Map(); async function updateStaffMap(staffs,lParms) { for (const staff of lParms) { staffs.set(staff.key, staff.val) } } export async function structStaffData(rawActivityData) { let rows = rawActivityData.newRows; for (const rowObject of rows) { for (const field of rowObject.fields) { if (field.fID == "staff") { await updateStaffMap(staffs, field.lParms); return staffs; } } } }