title: Lodash filtering/intersection of two object arrays in Javascript
body: <p>I have two arrays of objects. In the second array, you can assign an id from the first array. How can I filter the first array to only show results if its id has not been associated in array2? I have tried a nested filter of a filter in lodash, and a filter of a find, but it's just not working. </p>
  
  <p>Here is what I have tried:</p>
  
  <p>array1.filter(item => item.id === find(array2, { associatedID: item.id })[0].associatedID) Second iteration of finding inside a filter. I tried a similar filter approach instead of find, but that did not work either. Is there an issue with using the item.id inside the find function, as its provided from the parent filter param? or no?</p>
  
  <p>Help?</p>
  
  <pre><code>const array1 = [{
    "id": "1",
    "name": "Test 1"
  },
  {
    "id": "2",
    "name": "Test 2",
  }
  {
    "id": "3",
    "name": "Test 3",
  }
  ]
  
  const array2 = [{
    "id": "12",
    "name": "Test 1",
    "associatedID": "1"
  },
  {
    "id": "22",
    "name": "Test 2",
    "associatedID": "2"
  }
  {
    "id": "32",
    "name": "Test 3",
  }
  ]
  </code></pre>