Compare the elements of two arrays by Id and remove the elements from the one array that are not presented in the other
<p>I have two arrays of objects like this:</p>

<pre><code>var arr1 = [{Id: 1, Name: "Test1"}, {Id: 2, Name: "Test2"}, {Id: 3, Name: "Test3"}, {Id: 4, Name: "Test4"}]

var arr2 = [{Id: 1, Name: "Test1"}, {Id: 3, Name: "Test3"}]
</code></pre>

<p>I need to compare the elements of the two arrays by <code>Id</code> and remove the elements from <code>arr1</code> that are not presented in <code>arr2</code> ( does not have element with that <code>Id</code>). How can I do this ?  </p>
