Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

johnmerlino

macrumors member
Original poster
Oct 22, 2011
81
0
Hi all,

I have an nsdictionary like this:

NSDictionary *code = [data objectForKey:mad:"code"];

code looks like this:

code = {
fence = OFF;
}


Now I want to get the name 'fence' rather than the value 'OFF'. So objectForKey wont work. I have a generic method so i can't explicitly ask for "fence".

thanks for response
 
Hi all,

I have an nsdictionary like this:

NSDictionary *code = [data objectForKey:mad:"code"];

code looks like this:

code = {
fence = OFF;
}


Now I want to get the name 'fence' rather than the value 'OFF'. So objectForKey wont work. I have a generic method so i can't explicitly ask for "fence".

thanks for response

I'm not really sure where you're going with this, but you could try NSDictionary's allKeys: method. This returns an NSArray with all they keys in the NSDictionary. If that's not what you're looking for, please be more descriptive in what you're trying to accomplish.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.