写真のような値の辞書があり、本IDの整数値があります。bookidが一致するかどうかを確認するにはどうすればよいですか?
これは私のチェックコードです
NSMutableDictionary *plistdictionary = [[NSMutableDictionary alloc]initWithContentsOfFile:metaDataPath];
NSMutableArray *notes=[plistdictionary objectForKey:@"usernotes"];
NSLog(@"notes value %@",notes);
NSArray *CollectingBookid=[[NSArray alloc]init];
CollectingBookid=[notes valueForKey:@"bookid"];
NSArray *CollectingPages=[[NSArray alloc]init];
CollectingPages=[notes valueForKey:@"pagenumber"];
NSArray *CollectingNotes=[[NSArray alloc]init];
CollectingNotes=[notes valueForKey:@"notes"];
NSLog(@"collection of book id%@",CollectingBookid);
NSString *bookid=@"95";
NSString *page=@"1";
int c=[CollectingBookid count];
for(int i=0;i<c;i++)
{
NSString *singleBookids=[CollectingBookid objectAtIndex:i];
NSString *singlePage=[CollectingPages objectAtIndex:i];
if([singleBookids isEqualToString:bookid])
{
if([singlePage isEqualToString:page])
{
NSMutableArray *CompleteUserNotes=[[NSMutableArray alloc]init];
CompleteUserNotes=[CollectingNotes objectAtIndex:i];
NSLog(@"Selected Notes%@",CompleteUserNotes);
}
}
}