How to calculate number of rows for each section and populate it's data. Below is the data.
<__NSCFArray 0x7fadb3e73a60>(
{
AMID = "";
AMName = "xyz";
records = (
{
EId = 100;
EMName = "abc";
EName = "Ename1";
}
);
EGroupId = 001;
EGroupName = "SectionName1";
stat = G;
},
{
AMID = "";
AMName = "zyx";
records = (
{
EId = 144;
EMName = "namename";
EName = "somestring";
},
{
EId = 159;
EMName = "somestring";
EName = "somestring";
},
{
EId = 161;
EMName = "somestring";
EName = "somestring";
}
);
EGroupId = 86;
EGroupName = "SectionName2";
stat = Y;
}
)
From the above data, i want the "EGroupName" value in sections and dynamically count the numberofrowsinsection for each section(in this case, it's 'SectionName1 and SectionName2). Final output Should Be like,
**SectionName1**
return 1;
**SectionName2**
return 3;
really appreciate your help.
Edited
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString *selectedEngagementGroupId = engagementGroupDataArray[indexPath.section][@"EngagementGroupId"];
NSString *selectedEngagementId = modelItem[@"EId"];
NSLog(@"EGId %@",selectedEngagementGroupId);
NSLog(@"EId %@",selectedEngagementId);
}