title: Normalize objects in array such that all contain the same set of keys
body: <p>I am hitting an endpoint that is returning an array of objects, each object can potentially have a set of fields, e.g.,</p>
  
  <pre class="lang-js prettyprint-override"><code>const FIELDS = [
    'id',
    'title',
    'contributor',
    'mediatype',
    'source'
  ]
  </code></pre>
  
  <p>However, some objects will only have some of those fields, some may have all.</p>
  
  <pre><code>const items = [
    {
      "id": 1,
      "title": "some title 1",
      "contributor": "bob",
      "mediatype": "text"
    },
    {
      "id": 2,
      "title": "some title 2",
      "mediatype": "text"
    }.
    {
      "id": 3,
      "title": "some title 3",
      "mediatype": "movies"
      "source": "comcast"
    }
  ]
  
  </code></pre>
  
  <p>I want to "normalize" all the objects such that every single one contains every expected field, filling the "gaps" with <code>null</code>, or some falsey value such that graphql (which I intend to eventually feed it into) is happy. </p>
  
  <pre><code>const items = [
    {
      "id": 1,
      "title": "some title 1",
      "contributor": "bob",
      "mediatype": "text",
      "source": null
    },
    {
      "id": 2,
      "title": "some title 2",
      "mediatype": "text",
      "contributor": null,
      "source": null
    }.
    {
      "id": 3,
      "title": "some title 3",
      "mediatype": "movies",
      "contributor": null,
      "source": "comcast"
    }
  ]
  </code></pre>
  
  <p>My "nasty" looking code looks something like this</p>
  
  <pre><code>const normalize = items =&gt; 
    items.map(item =&gt; {
      FIELDS.forEach(f =&gt; {
        if (!item[f]) {
          item[f] = null;
        }
      });
      return item;
    });
  </code></pre>
  
  <p>Any suggestions for writing this more elegantly - either with vanilla JS or lodash, which I am equally open to using as its already available in my codebase?</p>