convert type Nested List in another type using Java 8, using Stream

Keywords: java-8 java-stream nested-lists


I have a nested List

TypeOne has a method TypeTwo getTypeTwo() { return typeTwo;}

List<List<TypeOne>> nestedListsTypeOne = someMethodPopulate();
.foreach(listTypeOne -> map(TypeOne -> TypeOne::getTypeTwo))

But, I don't know how to do it.

What is the efficient manner convert nested list type into another type?