I have the following type of a NSMutableDictionary
(
{
id = 1;
key = value;
key = value;
},
{
id = 2;
key = value;
key = value;
}
)
It contains multiple data of an own Object. Now, in cellForRowAtIndexPath
. I created a CustomCell that has a field CustomCell.customObject
that should get this object. What I'm trying to do is the following. I want to assign the current entry of the NSMutableDictionary
to this field.
Alternatively I could do this (and am doing it right now) I'm getting the ID like this
NSString *objectId = [[dict valueForKey:@"id"] objectAtIndex:indexPath.row];
And then I'm loading the object from the database. The problem I'm seeing in this, is the doubled request. I mean, I already have the data in my NSMutableDictionary, so why should I request it again?
I don't want to just assign a certain key-value pair, I want to assign the whole current object entry of the NSMutableDictionary. How would I do this?