показать кнопку при получении ответа json, равного строке типа @ «unapproved»
Здесь я получаю некоторые клипы из API. И я хочу отобразить кнопку, когда статус клипа не одобрен, поэтому в ответе json в настоящее время я показываю «0» для «неутверждено». так что теперь хочу отобразить кнопку, когда
staus "0". я получил код ниже только из стека и работает нормально до [парк enumerateObjectUsingBlock ..] я получаю ответ в виде состояния, равного "1" и некоторых клипов "0". но мой код не работает после NSSring * title, он показывает title как nil, поэтому скажите мне, как получить значение в * 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;
}