Assuming the following simplified domain model:
a loop based solution would look like this.
Please note that this is not the best solution.
You can accomplish the same thing using the find operation from the list operation activity, and it will be much faster.