var result = hotels.SelectMany(hotel => hotel.RoomType.Select(room => new { Id = room.RoomId, Hotel = hotel })) .GroupBy(item => item.Id) .Select(group => group.FirstOrDefault());