I have stored the data in nsmutabledictionary, given below the dictionary values
which I stored and the values are the instances, how do I retrieve the values in the object?
English = (
"<Row: 0x4e50560>",
"<Row: 0x4e50790>",
"<Row: 0x4e509d0>"
);
Roman = (
"<Row: 0x4e50c60>",
"<Row: 0x4e50ea0>"
);
japanese = (
"<Row: 0x4e51150>",
"<Row: 0x4e513a0>",
"<Row: 0x4e515e0>",
"<Row: 0x4e51860>"
);
arab = (
"<Row: 0x4e50140>"
);
While I retrieving it, the last object is viewed & I can’t view the other object in my code. How do I access the values in the each key of the dictionary and the values are as object. Can anyone explain what I am missing in the above code.
Here is my code
NSArray *keys;
id key, value;
keys = [appDelegate.viewDictionary allKeys];
int count = [keys count];
for (int i = 0; i < count; i++)
{
key = [keys objectAtIndex: i];
value = [appDelegate.viewDictionary objectForKey: key];
NSLog (@"Key: %@ for value: %@", key, value);
for(Row *rs in value) {
NSLog(@"%@", rs.user);
//cell.textLabel.text = rs.user;
}
}
Here is an example close to your question, look at the code for differences and see if it helps.