For grouping data and using forEach or .each over ...
# suitescript
a
For grouping data and using forEach or .each over an Array of Objects I use something like this:
Copy code
(groupedData.DATA[oData.assembly] || (groupedData.DATA[oData.assembly] = [])).push(util.extend({},oData));
I'm not a big fan of .map but @erictgrubaugh approach is totally valid and useful.