title: How to remove items in one array if other has it?
body: <p>How to remove item from array B if array A has it. I want to iterate through by ID.</p>
  
  <p>array A: it has all the items</p>
  
  <pre><code>[{
  "Name":"John", 
  "Id":1
  },
  {
  "Name":"Peter", 
  "Id":2
  },
  {
  "Name":"Phillip", 
  "Id":3
  },
  {
  "Name":"Abby", 
  "Id":4
  },
  {
  "Name":"Don", 
  "Id":5
  }]
  </code></pre>
  
  <p>array B: has just the selected items</p>
  
  <pre><code>[{
  "Name":"John", 
  "Id":1
  },
  {
  "Name":"Abby", 
  "Id":4
  }]
  </code></pre>
  
  <p>I want to remove from array A John and Abby by Id, because they are in array b.</p>
  
  <pre><code>for (var i = 0; i &lt; a.length; i++) {
     if (b[i].Id == ta[i].Id) {
        for (var j = 0; j &lt; b[j]; j++) {
                a.splice(i, 1);
        }
     }
  }
  </code></pre>
  
  <p>this is not working as I thought</p>