title: How to get a single property value from an array of objects?
body: <p>I've an array of objects:</p>
  
  <pre><code>$list = @( `
                  @{title='First';guid='0118B390-3AF5-406E-920D-FE140392584D'}, `
                  @{title='Second';guid='2C78DA61-B6EF-4E4E-8FF8-4A95D75C8188'}, `
                  @{title='Third';guid='0EDC361C-862E-41FC-8A60-870CADC17EC5'} `
              )
  </code></pre>
  
  <p>I want to use the guid to look up and return a title.  All I want is the value, I don't want to return an object.  For example, if looking up guid '2C78DA61-B6EF-4E4E-8FF8-4A95D75C8188' I just want to return a string value 'Second', rather than an object with a property whose value is 'Second'.  </p>
  
  <p>How can I do this?</p>
  
  <p>I've tried the following:</p>
  
  <pre><code>$list | where guid -eq '2C78DA61-B6EF-4E4E-8FF8-4A95D75C8188'
  </code></pre>
  
  <p>which returns a hash table</p>
  
  <p>and </p>
  
  <pre><code>$list | where guid -eq '2C78DA61-B6EF-4E4E-8FF8-4A95D75C8188' | select {$_.title}
  </code></pre>
  
  <p>which returns a PSObject with a <code>{$_.title}</code> NoteProperty.</p>
  
  <p>The following two attempts work:</p>
  
  <pre><code>($list | where guid -eq '2C78DA61-B6EF-4E4E-8FF8-4A95D75C8188' `
      | select {$_.title}).{$_.title}
  
  ($list | where guid -eq '2C78DA61-B6EF-4E4E-8FF8-4A95D75C8188' `
      | select @{Name="result";Expression={$_.title}}).result
  </code></pre>
  
  <p>However, they're both ugly.  Is there a better way of returning just the value?</p>