I have a JSON array that I parse. I parse the values from the key Staff, however sometimes the Staff object contain no values;
Expected return;

But sometimes it returns:

Which causes the app to crash because key[@"staff"][@"staff_id"] doesnt exist.
Ive tried:
if (key[@"staff"][@"staff_id"]){
//Parse staff
}
else{
//staff is empty
}
But this crashes as well because I think it still looks for the [@"staff_id"] which doesnt exist.
I've also tried
if (![key[@"staff"][@"staff_id"] isKindOfClass:[NSNull class]])
And
if (![key[@"staff"] isKindOfClass:[NSNull class]])
Any help is greatly appreciated. :)