If I NSLOG() the array that I’m trying to search I get this…
(
{
id = 101323790;
"screen_name" = AmyBurnett34;
},
{
id = 25073877;
"screen_name" = realDonaldTrump;
},
{
id = 159462573;
"screen_name" = ecomagination;
},
{
id = 285234969;
"screen_name" = "UCB_Properties";
},
{
id = 14315150;
"screen_name" = MichaelHyatt;
}
)
This is fine but what I need to do is to be able to have a method that lets me put in an id and then it returns the matching screen_name as an NSString. How could I do this is the array is called.
I think NSPredicate is what I’m looking for but I’m not sure…
NSArray *twitterInfo;
Yep, NSPredicate is what you want. Something like this: