我有一个包含对象数组的对象.
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"});
Run Code Online (Sandbox Code Playgroud)
我想知道从数组中删除重复对象的最佳方法是什么.所以,例如,事情会变成......
{place:"here",name:"stuff"},
{place:"there",name:"morestuff"}
Run Code Online (Sandbox Code Playgroud)