Lodash / javascript : Compare two collections and return the differences
<p>I have two arrays of objects:</p>
<p>Elements of my tables are not primitive value, but complex objects.</p>
<pre><code>array1 = [obj1,obj2,obj3,obj4]
array2 = [obj5,obj5,obj6,obj7]
</code></pre>
<p>I would like to compare two arrays and see if the elements of array2 are already present in array1 then create a new array of the difference.</p>
<p>Any suggestions?</p>