how to find an element in array of object with streams

PHOTO EMBED

Wed Apr 01 2020 08:28:49 GMT+0000 (Coordinated Universal Time)

Saved by @Gameron #java #java #stream #array

itemList.stream()
          .filter(item -> item.getPropertyList()
                         .stream().anyMatch(property -> property.getKey().equals("Test")))
           .collect(Collectors.toList());
content_copyCOPY

This code is used to find an element in array objects with streams

https://stackoverflow.com/questions/60966469/how-to-find-an-element-in-array-of-object-with-streams