I have an object that contains an array of objects.
(我有一个包含对象数组的对象。)
things = new Object();
things.thing = new Array();
things.thing.push({place:"here",name:"stuff"});
things.thing.push({place:"there",name:"morestuff"});
things.thing.push({place:"there",name:"morestuff"});
I'm wondering what is the best method to remove duplicate objects from an array.
(我想知道什么是从数组中删除重复对象的最佳方法。)
So for example, things.thing would become...(举例来说,事物……东西将变成……)
{place:"here",name:"stuff"},
{place:"there",name:"morestuff"}
ask by Travis translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…