title: unique union in lodash
body: <p>I have two kind of collections:</p>
  
  <p>fieldMappingViewModel.MappedFields():</p>
  
  <pre><code>[
  { "EmailField" : "FirstName", "CrmField" : "FirstName" },
  { "EmailField" : "LastName", "CrmField" : "LastName" },
  { "EmailField" : "Job", "CrmField" : "JobTitle" }...
  ]
  </code></pre>
  
  <p>_all:</p>
  
  <pre><code>[
      { "EmailField" : "FirstName", "CrmField" : null },
      { "EmailField" : "LastName", "CrmField" : "LastName" },
      { "EmailField" : "Job", "CrmField" : "JobTitle" }...
      ]
  </code></pre>
  
  <p>I am trying to create a unique union of these two using:</p>
  
  <pre><code>fieldMappingViewModel.allMappings(_.uniq(_.union(fieldMappingViewModel.MappedFields(), _all),
                  function (item, key) {
                      // not the ones that their item.EmailField() already exists with a CrmField value
                  }));
  </code></pre>
  
  <p>Ofcourse the strict equality still leaves in the results objects that have had a repeated Email field but their CrmField is different.</p>
  
  <p>How Can I get rid of the ones with CrmField: Null from my final results?
  (I only want to filter those null ones that their non-null pair exists. Otherwise I want to keep the pair with null in it)</p>
  
  <p>So I dont end up with </p>
  
  <pre><code>{ "EmailField" : "FirstName", "CrmField" : "FirstName" }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>{ "EmailField" : "FirstName", "CrmField" : null }
  </code></pre>
  
  <p>both in the final results. but only:</p>
  
  <pre><code>{ "EmailField" : "FirstName", "CrmField" : "FirstName" }
  </code></pre>