ios compruebe si nsarray == nulo
Recibo alguna respuesta deJSON
, y funciona bien, pero necesito verificar algunosnull
valores
He encontrado diferentes respuestas pero parece que todavía no funciona,
NSArray *productIdList = [packItemDictionary objectForKey:@"ProductIdList"];
He intentado con
if ( !productIdList.count ) //which breaks the app,
if ( productIdList == [NSNull null] ) // warning: comparison of distinct pointer types (NSArray and NSNull)
Entonces, ¿qué está pasando? Cómo arreglar esto y verificarnull
en mi matriz?
¡Gracias