title: Need help understanding lodash's _.includes method
body: <p>I would like to use lodash's <code>_.includes</code> method in my code, but any time I have an array of objects I can't get it to work, and instead end up relying on the <code>_.find</code> method.</p>
  
  <p>From my tests I can only get <code>_.includes</code> to work with simply arrays. But maybe that's the way it's supposed to work?</p>
  
  <p>I am very new to Lodash and programming in general, so I thought I would ask in case I am missing something about how I can use this method.</p>
  
  <p>I created a jsbin with the following code: <a href="http://jsbin.com/regojupiro/2/" rel="noreferrer">http://jsbin.com/regojupiro/2/</a></p>
  
  <pre><code>var myArray = [];
  
  function createArray(attName, attId, otherId) {
      var theObject = {};
  
      theObject.attributeName = attName;
      theObject.attributeId = attId;
      theObject.otherId = [otherId];
  
        return theObject;
  }
  
  myArray.push(createArray('first', 1001, 301));
  myArray.push(createArray('second', 1002, 302));
  myArray.push(createArray('third', 1003, 303));
  myArray.push(createArray('fourth', 1004, 304));
  
  var isPresent1 = _.includes(myArray, {'attribtueId' : 1001});
  var isPresent2 = _.includes(myArray, 1001);
  var found = _.find(myArray, {'attributeId' : 1001});
  
  console.log(isPresent1);
  console.log(isPresent2);
  console.log(found);
  console.log(myArray);
  </code></pre>
  
  <p>Both "isPresent" variables return false, but the <code>_.find</code> method returns the correct object.</p>
  
  <p>I would love some help in better understanding how I could use the <code>_.includes</code> method when I just need to do a simple true/false check to see if a value is present in my array of objects.</p>
  
  <p>Or, if this is the wrong tool for the job, is the <code>_.find</code> method the right tool for this job, or some other lodash method that I'm not familiar with yet?</p>
  
  <p>Thank you for your help!</p>