Pergunta

I have this NSDictionary:

My NSDictionary

I need to find an object in champions, that has a defined value for key name (in this case the value entered by user is "Nasus") and then retrieve all key/value pairs from stats. Can You help me?

Thank You.

Foi útil?

Solução

To get the object from the dictionary theOfficial for the key documentation:

NSObject *pleaseRead = [theOfficial objectForKey:documentation];

To get all objects from the dictionary aQuickGoogleSearch:

NSArray *orEvenTry = [aQuickGoogleSearch allValues];

Once you've pulled an object out of a dictionary, you can treat it as a normal object.

Foo *myFooVar = [someDictionary objectForKey:@"myKey"];

Bar *myBarVar = [myFooVar someMethodThatReturnsBar];
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top