How does one create a NSSet
of objects from an array based on a property.
e.g. Array of objects, each with a strong reference to a type
property, and multiple occurrences of each type exist in the array. How can this be turned into an NSSet
holding a single object of each type.
NSSet *distinctSet = [NSSet setWithArray:[array valueForKeyPath:@"@distinctUnionOfObjects.property"]];