I have a NSMUtableDictionary which holds an key with a NSMutableArray of two objects in it, and another key with NSmutableArray of one object in it. How do I retrieve the contents from both the keys. Any help is appreciated.
This is what i have in log. personalvehicleDict:{
43 = (
"TempObject1",
"TempObject2"
);
56 = (
"TempObject3"
);
}
I want to retrieve data in TEmpObject1, TempObject2,TempObject3.
This is how i set the NSMutableDictionary. [personalvehiclepolicydict setObject: self.driverarray forKeyersonalvehiclepolicyattr];
Last edited by vikinara; 05-09-2011 at 03:35 PM.
Reason: Edit
Location: Somewhere the streets are on fire, the sewers are flooded, and the cats are high on catnip
Posts: 529
Are both the keys and the objects unknown to you, do you know what the objects(value or class) will be and not the keys, or do you know what the keys will be and not the objects?
If you want to get all the objects out, use -allKeys(NSDictionary Method), put it in a for loop, and then -objectForKey:[allKeys objectAtIndex:x] and then additional code as need.
Are both the keys and the objects unknown to you, do you know what the objects(value or class) will be and not the keys, or do you know what the keys will be and not the objects?
If you want to get all the objects out, use -allKeys(NSDictionary Method), put it in a for loop, and then -objectForKey:[allKeys objectAtIndex:x] and then additional code as need.
I dont know what the keys will be or what the objects will be. Both are dynamic. Please help me with this.