let initToIndex = arr1.reduce((acc, item, idx) => {
acc[item[0].init] = idx;
return acc;
}, {});
arr2.flat().forEach(x => {
let idx = initToIndex[x.init];
if (!initToIndex.hasOwnProperty(x.init)) {
idx = arr1.push([]) - 1;
initToIndex[x.init] = idx;
};
arr1[idx].push(x);
});