title: How to check if the object is in array?
body: <p>I have an array like this:</p>
  
  <pre><code>[#&lt;Merit::Badge id: 1, name: "just-registered", level: nil, description: nil, custom_fields: nil&gt;,
   #&lt;Merit::Badge id: 2, name: "change-username", level: nil, description: nil, custom_fields: nil&gt;]
  </code></pre>
  
  <p>How can I check if for example badge id 2 is present in the array? </p>