C#
LINQ

SelectManyで要素の中の要素を検索するサンプル

SelectManySample.cs
    class Group {
        public decimal No { get; set; }
        public string Name { get; set; }
        public List<Member> Members { get; set; }
    }

    class Member {
        public decimal No { get; set; }
        public string Name { get; set; }
        public decimal Age { get; set; }
        public bool IsIndoor { get; set; }
    }

    class SelectManySample {
        static void Main(string[] args) {

            // 初期化:GroupクラスはMemberクラスのリストを要素に持つ
            Group[] group =
            { new Group { No = 1, Name = "Cat", Members = new List<Member> {
                    new Member { No = 1, Name = "Tama", Age = 12, IsIndoor = true },
                    new Member { No = 2, Name = "Mike", Age = 9, IsIndoor = true },
                    new Member { No = 3, Name = "Chibi", Age = 1, IsIndoor = true },
                    new Member { No = 4, Name = "Mosa", Age = 3, IsIndoor = false },
                    new Member { No = 5, Name = "Grow", Age = 5, IsIndoor = false },
                }},
                new Group { No = 2, Name = "Dog", Members = new List<Member> {
                    new Member { No = 1, Name = "Taro", Age = 5, IsIndoor = false },
                    new Member { No = 2, Name = "Shiro", Age = 10, IsIndoor = true },
                    new Member { No = 2, Name = "Kuma", Age = 7, IsIndoor = false },
                }},
                new Group { No = 3, Name = "Turtle", Members = new List<Member> {
                    new Member { No = 1, Name = "Kamenashi", Age = 80, IsIndoor = true },
                    new Member { No = 2, Name = "Kameyama", Age = 55, IsIndoor = true },
                }},
            };

            // IsIndoor == true の Group Name と Member Name を取得
            var q = group
                .SelectMany(r => r.Members, (g, m) => new { g, m })
                .Where(r => r.m.IsIndoor == true)
                .Select(r => new { GroupName = r.g.Name, MemberName = r.m.Name });

            // 表示
            foreach (var v in q) {
                Console.WriteLine(string.Format("[{0}] {1}", v.GroupName, v.MemberName));
            }
        }
    }