· 7 years ago · Sep 22, 2018, 09:52 PM
1var ss = SpreadsheetApp.getActiveSpreadsheet();
2
3const contacts = ss.getRange('A2:A7').getValues(); // 2D array
4
5
6const filtered = contacts.filter ( function (row) {
7 return (row[1] != "");})
8
9const emails = filtered.map(function (nameRow) { return nameRow[0] + "@gmail.com"; });