Compare Objects In Javascript
I have next object: rows = [ { name: 'user1', previlege: 'Filtering' }, { name: 'user2', previlege: 'Reportering' }, { name: 'user3', previlege: '
Solution 1:
If you want to remove the element from the array you can try to store the result of filter into a new array
newArray = rows.filter(function(object) {
return JSON.stringify(object) !== JSON.stringify(selected);
});
rows = newArray;
Post a Comment for "Compare Objects In Javascript"