title: (Lodash) Is there a method to check if an identical object exists (nested) in a collection?
body: <p>I was wondering if there is a Lodash approach to this problem, which I would otherwise solve with a <code>for</code> loop. I would like to return <code>true</code> if <code>collection</code> contains one or more elements with nested object identical to <code>c</code>.</p>
  
  <p>The below example would return <code>true</code> because <code>collection[1]</code> contains an identical <code>c</code>.</p>
  
  <p>Needle:</p>
  
  <pre><code>c = {
    x: 11,
    y: 22,
    z: 33
  }
  </code></pre>
  
  <p>Haystack:</p>
  
  <pre><code>collection = [
    {
      a: 1,
      b: 1,
      c: {
        x: 10,
        y: 20,
        z: 30
      },
      d: 1
    },
    {
      a: 1,
      b: 1,
      c: {
        x: 11,
        y: 22,
        z: 33
      },
      d: 1
    },
    {
      a: 1,
      b: 1,
      c: {
        x: 12,
        y: 24,
        z: 36
      },
      d: 1
    }
  ]
  </code></pre>
  
  <p>This is different from questions such as <a href="https://stackoverflow.com/questions/31683075/how-to-do-a-deep-comparison-between-2-objects-with-lodash">How to do a deep comparison between 2 objects with lodash?</a> because I need to check if any of the collection items contain an identical object nested within them, not compare whether two objects are identical to each other.</p>
  
  <p>Thanks in advance for your help.</p>