I am trying to insert sample data into core data by fetching it from plist. But that data is not getting inserted in Ordered manner.
Below is my plist structure.
Below is the code which I tried.
NSArray *aArray = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle]pathForResource:@"SampleData" ofType:@"plist"]];
for (NSDictionary *aDict in aArray )
{
[aDict enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop)
{
//--- UPDTATE -->>
// while debugging I found one issue that -
//Here "obj" has three array - Sample List 1C,Sample List 1A,Sample List 1B
// This should be Sample List 1A,Sample List 1B,Sample List 1C
NSDictionary *aSubDict = (NSDictionary *)obj;
NSMutableArray *aMutCheckpoint = [NSMutableArray array];
//.… below is my logic for core data insertion…
}];
}
Can any one please suggest me the way to how do I get ordered values here while inserting data.