title: Check if one element exists in an array of objects
body: <p>I have the following array of objects:</p>
  
  <pre><code>var memberships = [
    {
      id: 1,
      type: 'guest'
    },
    {
      id: 2,
      type: 'member'
    }
  ];
  </code></pre>
  
  <p>How can I verify if such an array has at least one element with type 'member'?</p>
  
  <p>Note that the array can also have no elements.</p>