我只是想用Product_Id来预测我的数组。我试过这个
NSPredicate *pred=[NSPredicate predicateWithFormat:@"\"Product_Id\" ==%d",[[[_result valueForKey:@"Product_Id"] objectAtIndex:indexPath.row] integerValue]];
predicatedArray = [_likesArray filteredArrayUsingPredicate:pred];
_likesArray
下面是字典数组
(
{
DeviceLikeStatus = 1;
Msg = "";
ProductCount = 1;
"Product_Id" = 116;
}
)
并不是预测任何事情,总是显示predicateArray
为空。
答案 0 :(得分:2)
不需要“在谓词中 试试
NSPredicate *pred=[NSPredicate predicateWithFormat:@"Product_Id ==%d",[[[_result valueForKey:@"Product_Id"] objectAtIndex:indexPath.row] integerValue]];