我正在加载一个
JSON,但我想查看“URL”:“”,在json中,有时ID是空的,我该怎么检查?
@H_404_2@if(URL == HOW TO CHECK IF EMPTY?)
{
}
else
{
}
错误:
@H_404_2@*** Terminating app due to uncaught exception 'NSRangeException',reason: '*** -[__NSArrayI objectAtIndex:]: index 0 beyond bounds for empty array' *** First throw call stack:解决方法
嗯,试试吧
@H_404_2@if ([URL isEqualToString:@"The URL?"]) {