I am trying to access a list of string from a data structure which is having collection of collection. What I have tried yet is returning a list of collection,but I want a single list. Here is my code:
Collection result= (Collection)allPatientsAccessRecords.stream()
.filter(rec -> rec.data.personId==8191).map(data->data.accessData.associatedAreas).
collect(Collectors.toList());
Here is a snapshot of a source data structure:
Can someone hint me how i can get accessData->associatedArea(list of string) as a result using stream API ?