解决方案 »

  1.   

    你上面的代码中有一处明显的错误
    NSMutableDictionary *anotherDict = [NSMutableDictionary dictionary];  ////////这是一个空的对象
    advicenumber=[NSDictionary dictionaryWithDictionary:anotherDict];      ///////advicenumber的指针被指向了anotherdict这个空对象,所以在使用NSLog输出时没有数据
    错误的原因在后面的注释中有说明。为什么搞的那么麻烦,从arrayCheck中取出时直接转成NSMutableDictionaryNSMutableDictionary *advicenumber=(NSMutableDictionary *)[arraycheck objectAtIndex:i];
    NSLog(@"dictionary is :%@",advicenumber);
    if (advicenumber !=[NSNull null] ) {
            if ([advicenumber[@"advicenumber"] isEqualToString:dicUPdata[@"advicenumber"]]) {
                      [advicenumber setValue:@"已通过" forKey:@"boolpass"];
            }
    }