Вы можете следовать моему методу:
let array = [
{el: 1, ready: true},
{el: 2, ready: false},
{el: 3, ready: false},
{el: 4, ready: false},
{el: 5, ready: true},
{el: 6, ready: true},
{el: 7, ready: false},
];
/*
let arrayGroup = [
[
{el: 1, ready: true},
],
[
{el: 2, ready: false},
{el: 3, ready: false},
{el: 4, ready: false}
],
[
{el: 5, ready: true},
{el: 6, ready: true}
],
[
{el: 7, ready: false}
]
];
*/
var arrayGroup = [];
array.forEach((current,index)=>{
if(index===0){
arrayGroup.push([{el:current.el, ready:current.ready}]);
}else{
//check previous group if same will add to there, or not same, will add to new
if(current.ready === array[index-1].ready){
arrayGroup[arrayGroup.length-1].push({el:current.el, ready:current.ready});
}else{
arrayGroup.push([{el:current.el, ready:current.ready}]);
};
};
});
console.log(arrayGroup);