Given an IList<Foo>
with a data set that looks like this:
ID CHILD PARENT TYPE
1 102 101 UPSELL
1 103 101 UPSELL
2 102 101 BONUS
2 104 103 BONUS
3 102 101 BONUS
4 102 101 PRODUCT
4 104 102 PRODUCT
How can I use LINQ to find a child which has a parent with the same ID?
Desired output is
ID CHILD PARENT TYPE
4 102 101 PRODUCT