title: Chai - Testing for values in array of objects
body: <p>I am setting up my tests for the results to a REST endpoint that returns me an array of Mongo database objects.</p>
  
  <pre><code>[{_id: 5, title: 'Blah', owner: 'Ted', description: 'something'...},
   {_id: 70, title: 'GGG', owner: 'Ted', description: 'something'...}...]
  </code></pre>
  
  <p>What I want my tests to verify is that in the return array it conatins the specific titles that should return.  Nothing I do using Chai/<a href="http://chaijs.com/plugins/chai-things/" rel="noreferrer">Chai-Things</a> seems to work.  Things like <code>res.body.savedResults.should.include.something.that.equals({title: 'Blah'})</code> error out I'm assuming since the record object contains other keys and values besides just title.</p>
  
  <p>Is there a way to make it do what I want?  I just need to verify that the titles are in the array and don't care what the other data might be (IE _id).</p>
  
  <p>Thanks</p>