I have an object that contains an array of objects.

obj = {};

obj.arr = new Array();

obj.arr.push({place:"here",name:"stuff"});
obj.arr.push({place:"there",name:"morestuff"});
obj.arr.push({place:"there",name:"morestuff"});

I’m wondering what is the best method to remove duplicate objects from an array. So for example, obj.arr would become…

{place:"here",name:"stuff"},
{place:"there",name:"morestuff"}

73 s
73

Leave a Reply

Your email address will not be published. Required fields are marked *