title: Merge objects inside the two arrays using lodash
body: <p>I am trying to merge two arrays into one.
  First one has default configuration and the second one has actual one.
  I found very similar problem <a href="https://stackoverflow.com/questions/39127565/merge-array-of-objects-by-property-using-lodash" title="Here">here</a>, but in my specific case it does not work.</p>
  
  <p>Default configuration:</p>
  
  <pre><code>[
    { configurationOption: 'X provisioning', platform: 'X', value: true },
    { configurationOption: 'Y provisioning', platform: 'Y', value: true },
    { configurationOption: 'Z provisioning', platform: 'Z', value: true }
  ]
  </code></pre>
  
  <p>Actual configuration:</p>
  
  <pre><code>[
    { platform: 'X', value: false },
    { platform: 'Y', value: true }
  ]
  </code></pre>
  
  <p>Expected result:</p>
  
  <pre><code>[
    { configurationOption: 'X provisioning', platform: 'X', value: false },
    { configurationOption: 'Y provisioning', platform: 'Y', value: true },
    { configurationOption: 'Z provisioning', platform: 'Z', value: true }
  ]
  </code></pre>
  
  <p>So basically what it needs to do is update 'value' property of default configuration, based on actual one, tricky part is that some of configurationItem does not exist in actual configuration and actual configuration is missing 'configurationOption' property.</p>
  
  <pre><code>var config = _.unionBy(actual, defaultConf, 'platform');
  </code></pre>
  
  <p>This line is the closest one I could get, but is missing 'configurationOption' property.</p>
  
  <p>Here is CodePen so you can play around with it: <a href="https://codepen.io/anon/pen/oBwLMb?editors=0012" rel="nofollow noreferrer">https://codepen.io/anon/pen/oBwLMb?editors=0012</a></p>