Here I am fetching some clips from API. And i want to display a button when the status of clip is unapproved so in json response currently i am showing "0" for "unapproved". so now want to display a button when
staus is "0". i got below code from stack only and is working fine upto [park enumerateObjectUsingBlock ..] i am getting response as state equal to "1" and of some clips "0". but my code doesn't work after NSSring *title it shows title as nil so tell me how to get the value in *title
// log debugger response -- park=(__NSArrayM) * @"3 objects" [0] (MyVideos *) // _clip_name=(NSTaggedPointerString) * @"Kotak1" // _state=(NSTaggedPointerString) * @"1" // _clip_image_path=(__NSCFString *)@"1EKNA1464617788.jpg" // status = (NSString *)nil NSURL *url = [NSURL URLWithString:@"task=webapi.getJClips"]; park = [jsonLoader videosFromJSONFile:url]; [park enumerateObjectsUsingBlock:^(id object, NSUInteger idx, BOOL *stop) { // if i add a breakpoint at above line and on this line it give me response state = "1" but on below line it crashes //here it crashes on below line in debugger it shows title nil NSString *title = object[@"state"]; } // here below is code for showing hidden button after getting response "0" if ([title isEqual:@"0"]) { //If so, get the correct button from the enumerate idk and set hidden NO and text = title // UIButton *button = [buttonArray objectAtIndex:idx]; // button.hidden = NO; // button.text = title; }