I have a List<List<Opportunity>> totalMpRecords
I want to be able to extract all the Opportunties in each of those Lists and put them in one main List.
This seems pretty straightforward, yet I cannot figure out how to do this efficiently. The following does not compile:
//List<List <Opportunity>> totalMpRecords
//List<Opportunity> finalListOpps
for(Opportunity opp : totalMpRecords){
for(Opportunity innerList : opp.Opportunities){
finalListOpps.add(innerList);
}
}