i have a groupList array that stores different data in each array. I'm wondering how to send a compiled list of data from groupList. I could go the long way of just doing groupList[1], groupList[2]...etc ..but my groupList is pretty huge. My code below won't work since it doesn't allow for loops in 'object' parameters.
MailApp.sendEmail(
"john@doh.com",
"Generated Report " + new Date(), // header
"", // body
{htmlBody:
for (i = 0; i < groupList.length; i++) { // <-- Syntax error
groupList[i];
}
, attachments: chart });
}