I am trying to delete some objects that I have duplicated in my array.
I have an array like this.
[{ box: 1, color: 'red', size: 10 },
{ box: 2, color: 'yellow', size: 7},
{ box: 2, color: 'red', size: 10 },
{ box: 1, color: 'red', size: 10 },
{ box: 3, color: 'red', size: 10 }]
So I need to delete the object or objects that are duplicated in all properties. In this case only the box: 1 with color: red and size: 10 is duplicated.
So the output should be this.
[{ box: 1, color: 'red', size: 10 },
{ box: 2, color: 'yellow', size: 7},
{ box: 2, color: 'red', size: 10 },
{ box: 3, color: 'red', size: 10 }]
I have been reading about some functions that delete duplicated objects... but I could not solve my problem...
Any help? Thank you in advance