How i know the index of Array object in NSCountedSet
<p>This is my code for getting duplicate Device Contacts and i want to know how to get the index of the duplicate contacts</p>

<pre><code>NSCountedSet *set = [[NSCountedSet alloc] initWithArray:[Contact valueForKey:@"emailAddress"]];

for(id name in set){
    if([name isEqual:[NSNull null]] || [name isEqualToString:@""]){

    } else {
        array=[[NSMutableArray alloc]init];
        duplicateEmailDictionary =[NSMutableDictionary new];
        if ([set countForObject:name]&gt;1) {
            for (int i=0; i&lt;[set countForObject:name]; i++) {
                [array addObject:name];
            }
            [duplicateEmailDictionary setObject:array forKey:@"emailAddress"];
            [finalDuplicateEmail addObject:duplicateEmailDictionary];
        }
    }
}
</code></pre>