title: Excluding missing keys from JSON comparison
body: <p>I have two JSON documents that I want to assert equal for Jest unit testing. They should be equal, except the second one has one more key: _id. </p>
  
  <p>Example:</p>
  
  <pre><code>doc1.json
  {
      username: 'someone',
      firstName: 'some',
      lastName: 'one',
  }
  
  doc2.json
  {
      _id: '901735013857',
      username: 'someone',
      firstName: 'some',
      lastName: 'one',
  }
  </code></pre>
  
  <p>My code currently looks like this:</p>
  
  <pre><code>const result = await activeDirectoryUserCollection
      .findOne({username: testUser1.username});
  expect(result).toBe(testUser1);
  </code></pre>
  
  <p>Obviously this gives the error that they are not equal, just because of that one value.</p>
  
  <p>I'm looking for an alternative to .toBe() that doesn't completely compare the docs, but checks if one is a subset of another. (or something like that).</p>
  
  <p>Alternatively I would appreciate someone to point me to a module that could help me out.</p>