I have an Array full of 'n' dictionaries. These dictionaries have the same numbers of fields 'x' fields, with the same name (As a simulation of a typical database table). Field 'B' for example may contain a number or name. I want to know how many different elements there are of a value that matches the field 'B' in this Array.
To select a field with a value I do it this way,
'NSPredicate * predicate = [NSPredicate predicateWithFormat: @ "B IN% @", @ [value]];'
But it returns all the fields whether they are different or not. How would I have to do it to return only the different ones? And then count them? That is, it would be similar to doing SQL when doing a 'SELECT COUNT (DISTINCT columnName) FROM tableName'