In my current iPhone project, I have a created a dictionary that groups the sub dictionaries by the first letter of the "Name" key. NSLog returns the following. I would like to create an identical dictionary that only shows the "Name" key under each initial letter key. What is the best way for making a copy of some of the items in the sub dictionaries? The ObjectForKey methods will select only the items for the initial letter (ex: "B" or "C"). Please let me know if I didn't explain this clearly enough. Thanks!
sectionedDictionaryByFirstLetter:{
B = (
{
Name = "B...A Name Starting with B";
Image = "ImageName1.png";
Text = "Some Text";
}
);
C = (
{
Name = "C...A Name Starting with C";
Image = "ImageName2.png";
Text = "Some Text";
}
);
N = (
{
Name = "N...A Name Starting with N";
Image = "ImageName3.png";
Text = "Some Text";
},
{
Name = "N...A Name Starting with N";
Image = "ImageName4.png";
Text = "Some Text";
},
{
Name = "N...A Name Starting with N";
Image = "ImageName5.png";
Text = "Some Text";
}
);
}
The final result I'm looking for is:
sectionedDictionaryByFirstLetter:{
B = (
{
Name = "B...A Name Starting with B";
}
);
C = (
{
Name = "C...A Name Starting with C";
}
);
N = (
{
Name = "N...A Name Starting with N";
},
{
Name = "N...A Name Starting with N";
},
{
Name = "N...A Name Starting with N";
}
);
}