This question already has an answer here:
- Grouping NSArray of NSDictionary based on a key in NSDictionay 2 answers
I have a NSDictionary and i want to group it creating an array of objects by date
Example of the main NSDictionary:
({
date = "2014-04-27";
group = "yellow.png";
length = 180;
},
{
date = "2014-04-28";
group = "blue.png";
length = 180;
},
{
date = "2014-04-27";
group = "blue.png";
length = 120;
})
I want to group something similar as:
2014-04-27 = (
{
date = "2014-04-27";
group = "yellow.png";
length = 180;
},
{
date = "2014-04-27";
group = "blue.png";
length = 180;
})
2014-04-28 = ( {
date = "2014-04-28";
group = "blue.png";
length = 120;
})
Could someone help me? i have tried many FOR but i cant get it