Re: looking for reference to a dictionary
Re: looking for reference to a dictionary
- Subject: Re: looking for reference to a dictionary
- From: Ken Thomases <email@hidden>
- Date: Wed, 22 Oct 2008 01:19:16 -0500
On Oct 21, 2008, at 11:08 AM, Stefan Wolfrum wrote:
I have an array. Each array entry is a dictionary. Each dictionary
has two key/value pairs (all are strings).
Now I get from somewhere else the value (a string) corresponding to
one of the keys. It's exactly the same string, content-wise (not
address-wise).
What I need: a reference/pointer to THAT dictionary inside the array
which contains this string as the value of the key (I know what key
it is).
How would I do that?
You may be able to accomplish what you're looking for using -[NSArray
filteredArrayUsingPredicate:].
You won't get the index of the dictionary which matches, but you will
get a reference to it (or them, if more than one match).
Cheers,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden