JSFiddle - React, Tailwind, and code Playground

by Mukesh Yadav

JavaScript

var data = [{
  Customer: 12,
  Group: 5
}, {
  Customer: 12,
  Group: 6
}, {
  Customer: 12,
  Group: 7
}];

console.log('Before removal',  data.length);

for(var index in data){
  if(data[index].Group == 5){
    data.splice(index, 1);
  }
}

console.log('After removal', data.length, data);