This question relates to a sheet worker, but it is a pure javascript problem, so I posted in the API forum because that's more likely to be seen by the scripters. I have this in a script which works fine: getSectionIDs(`repeating_${section}`, (idArray) => { const attrArray = []; fields.forEach(field => { idArray.forEach(id => { attrArray.push(`repeating_${section}_${id}_${field}`); }); }); fields is an array of attribute names in a single row of a repeating section. I thought I'd be able to create a more compact version using map, and tried this: const attrArray = idArray.map(id => fields.map(field => `repeating_${section}_${id}_${field}`)); This doest work and it took me a while to figure out what was going wrong. Instead of creating one array item for each attribute, it creates an item for each row id, with all the attributes on that row combined into a single item. How can I fix this so it works how I intend?