I have a variable called “pull” from a JSON feed. After checking the type of the class, the object is interpreted as NSLog this:
attending var type is: __NSCFBoolean
This is done using [varname class] to get the class type of the variable.
So, I want to see if this is true or false .... therefore I am writing this code ..:
if([[_events objectAtIndex:indexPath.row] objectForKey:@"attending"] == YES){
However, I cannot compile it because it gives me a yellow text error:

What am I doing wrong? How can I fix this. Just adding data to the feed is as follows:
{
attendees = (
);
attending = 1;
date = "2012-09-24 09:11:00";
id = 504;
lessonHTML = "somehtml.";
name = "Sup";
youtubeId = "http://www.youtube.com/watch?v=j1vb4cND3G0";
},
{
attendees = (
);
attending = 1;
date = "2012-09-24 09:11:00";
id = 503;
lessonHTML = "somehtml.";
name = "Sup";
youtubeId = "http://www.youtube.com/watch?v=j1vb4cND3G0";
},
{
attendees = (
);
attending = 0;
date = "2012-09-24 09:11:00";
id = 508;
lessonHTML = "somehtml.";
name = "Sup";
youtubeId = "http://www.youtube.com/watch?v=j1vb4cND3G0";
},
{
attendees = (
);
attending = 1;
date = "2012-09-24 09:11:00";
id = 509;
lessonHTML = "somehtml.";
name = "Sup";
youtubeId = "http://www.youtube.com/watch?v=j1vb4cND3G0";
},
{
attendees = (
);
attending = 0;
date = "2012-09-24 09:11:00";
id = 505;
lessonHTML = "somehtml.";
name = "Sup";
youtubeId = "http://www.youtube.com/watch?v=j1vb4cND3G0";
},
{
attendees = (
);
attending = 1;
date = "2012-09-24 09:11:00";
id = 506;
lessonHTML = "somehtml.";
name = "Sup";
youtubeId = "http://www.youtube.com/watch?v=j1vb4cND3G0";
},
source
share