I'm new to Objective-C, so please bear with me. I need to create an array (or a set) of name=value pairs with one condition that names can repeat in the set (thus I can't use NSMutableDictionary.) I found out that NSMutableSet seems to be what I need, but my dilemma now is how to add two NSString objects into it?
You probably cannot use NSMutableSet either because sets do uniquing by hash. If you have two objects that have the same hash (like two NSStrings that have the same characters) then you will end up with just one string in the set as well.
You probably would want to use an NSMutableArray where you put an object that has a key property and a value property that points to the actual object. Alternatively you can have your values in the NSArray by themselves and if you are looking for a certain one you can walk through the array and get the objects that have the matching key. Or more elegantly filter the array by key using an NSPredicate.
For how to filter arrays with predicates see here: http://www.cocoanetics.com/2010/03/filtering-fun-with-predicates/