title: removing elements from objects - javascript
body: <p>if I had an array of objects such as</p>
  
  <pre><code>const arrOfObj = [
      {
          'a': 'a', 
          'b': 'b', 
          'c': 'c',
          'd': 'd'
      }
   ]
  </code></pre>
  
  <p>how do I create a new array with an object that has only a and b?</p>
  
  <pre><code> {
          'a': 'a', 
          'b': 'b'
   }
  </code></pre>
  
  <p>I've been trying something like</p>
  
  <pre><code>Object.entries(arrOfObjs[0]).filter(x =&gt; x[0] !== 'a' &amp;&amp; x[0] !== 'b')
  </code></pre>
  
  <p>but there must be a simpler cleaner way</p>