I receiving data from URL, put it in NSDictionary, and then I need to create NSArray for each tags. My NSDictionary looks like:
(
{
id = {
text = 1;
};
logo = {
text = "url 1";
};
name = {
text = "some name 1";
};
},
{
id = {
text = 2;
};
logo = {
text = "url 2";
};
name = {
text = "some name 2";
};
},
{
id = {
text = 3;
};
logo = {
text = "url 3";
};
name = {
text = "some name 3";
};
}
)
I want to have array like that: arrLogo = (@"url 1", @"url 2", "url 3").
I'm doing next:
arrName=[[dict objectForKey:@"name"] valueForKey:@"text"];
But Xcode gives me an error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM objectForKey:]: unrecognized selector sent to instance
Problem in the code that I'm trying to initialize an arrays, it's look like that my dict consist of arrays. How do I extract the data correctly?