NSMutableArray *arrData =[NSMutableArray array];
arrData =[data objectForKey:@"data"];
NSLog(@"%@",arrData);
NSLog will print like
data =
(
{
date = "2016-01-20";
"end_time" = "12:25:00";
"start_time" = "11:00:00";
"total_units" = 59;
}
);
This data comes from server. Now, I want to add one more dictionary of data to this array coming from the server.
I did the following:
NSMutableDictionary *newDict = [NSMutableDictionary dictionary];
[newDict setObject:@"2016-01-22" forKey:@"date"];
[arrData addObject:newDict];
Now the app crashed. What went wrong?
[__NSArrayI addObject:]: unrecognized selector sent to instance 0x7fc4d3914d40