I want to get the property of any object matching the filter() of the stream, but I am unable to.
transactionsList.stream()
.filter(transaction -> transaction.getPayerIban() != null)
.findFirst()
//Here I get an Optional<Object>
.ifPresent()
.map(Transaction::getName)
I don't know what to do inside the .ifPresent() stream operation, but I want to get any transaction name of the matching transactions