I'm curious of the best way to detect that an arraycollection contains duplicate objects as determined by an object's property value. For example,
var _myArrayCollection:ArrayCollection = new ArrayCollection([{name: "name1", value: "value1"}, {name: "name2", value: "value2"}, {name: "name1", value: "value3"}]);
Notice that this arraycollection has 3 items. 2 of the items have the same value for the name property. I would consider this a duplicate.
Any ideas what the body of this method would look like? I have ideas but none of them feel very elegant.
private function containsDuplicates(ac:ArrayCollection, property:String):Boolean