The basic array class has .map, .forEach, .filter, and .reduce, but .groupBy i noticably absent, preventing me f
.map
.forEach
.filter
.reduce
.groupBy
Instead of groupby use reduce. Suppose product is your array
groupby
reduce
product
array
let group = product.reduce((r, a) => { console.log("a", a); console.log('r', r); r[a.organization] = [...r[a.organization] || [], a]; return r; }, {}); console.log("group", group);