問いたいデータ構造。Data
は であるTransformable
フィールドNSDictionary
です。
Obj = { //...
NSDictionary *data:@{
likesPeople:@[@{@"username":@"jack",@"id":@"ae3132"}]
}
}
私がやりたいのは、内部を検索して、 Xに誰もいないNSArray *fetchResult
ことを確認することです。これを実行しようとすると、宣言に問題があることが強調表示され、常にクラッシュします。likesPeople
id
NSPredicate
何が間違っているのか、必要な情報を効果的に取得するにはどうすればよいですか?
SocialWall *theSocialWall = fetchResult[0];
NSLog(@"%@",theSocialWall.data);
NSPredicate * predicate = [NSPredicate predicateWithFormat:@"data.likesPeople CONTAINS(c) %@",myUser.userWebID];
NSArray * result = [fetchResult filteredArrayUsingPredicate:predicate];
NSLog(@"%@",result);