title: How can I select the first child of a child using linq?
body: <p>I have a set of classes as follows:</p>
  
  <pre><code>public class ResponseWrapper
  {
      public IEnumerable&lt;Book&gt; data { get; set; }
  }
  
  public class Book
  {
      public List&lt;Author&gt; author_data { get; set; }
      public string isbn13 { get; set; }
      public string publisher_name { get; set; }
      public string title { get; set; }        
  }
  
  public class Author
  {
      public string name { get; set; }
      public string id { get; set; }
  }
  </code></pre>
  
  <p>A Book class contains a list of child Author items. In my case I'm trying to select the 'name' property of the <em>first</em> Author item in the collection.</p>
  
  <p>I thought I'd be able to select it using:</p>
  
  <pre><code>string author = response.data.Where(b =&gt; b.author_data.Any()).Select(b =&gt; b.author_data.FirstOrDefault().name);
  </code></pre>
  
  <p>however that won't compile and I think it's because Select returns a collection? Where as I'm just trying to get a single result.</p>
  
  <p>Can anyone tell me the correct linq statement I need to get the single result I'm after?</p>
  
  <p>Thanks</p>