SyntaxFix
Write A Post
Hire A Developer
Questions
Instead of creating strange things, you can just filter() and then map() your result.
filter()
map()
This is much more readable and sure. Streams will make it in only one loop.