I have a NSMutableArray containing NSMutableDictionary values. I have to identify a particular dictionary value exist in that NSMutableArray or not?
NSMutableArray:
tableData:
{
{
categories = 267;
"category_ids" = 267;
"created_at" = "2012-04-18 05:32:10";
"custom_design_from" = "2010-12-03 00:00:00";
}
{
categories = 267;
"category_ids" = 267;
"created_at" = "2012-04-18 05:32:10";
"custom_design_from" = "2010-12-03 00:00:00";
}
}
I have to identify the one particular dictionary value.
My Code:
if ( [tableData containsObject:[appDelegate.Product objectAtIndex:i]] )
{
// Return Always false...
}
As far as I remember,
containsObject:method check if array contains given object by sendingisEqual:message to all instances in it. NSDictionary class has method isEqualToDictionary: that comares dictionary’s content. You can try to make smth like thisthis method should return if your array contains given dictionary by calling