I am trying to loop through a array ob objects and group the items of the array into new arrays that have matching id:
API example:
api_array [
https://jsfiddle.net/u4k16ojz/5/
var result = new Array(4); api_array.forEach(function(item, index){ if (!result[item.id]){ result[item.id] = []; } result[item.id].push(item); })