I have following use case
class Agree{
}
class Agreebody{
Agree agree;
}
class AgreeFull{
List<AgreeBody> agreebody;
}
The requirement is to create a List of all Agrees present inside AgreeBody List.
List<Agree> l = new List<Agree>
agreeFull.getAgreeBody.stream(). ? //Need to get Agree from Each agreebody and make list of agrees
Shall i call .forEach
and do it manually or other better way?