Reputation: 930
I have a dictionary with an array of potential values for a key. Now I want to be able to remove just one of the values (according to a selection made by the user), but all the examples I find deal with dictionaries that don't contain an array.
Thanks!
Upvotes: 1
Views: 67
Reputation: 4677
So you have a NSMutableDictionary whose values are NSMutableArray objects whose items are NSString objects, right? If so,
retrieve the array using the dictionary key
NSMutableArray *mutableArray = mutableDictionary[key];
then delete the object
[mutableArray removeObject:stringObject];
Upvotes: 1