title: How to filter array of objects?
body: <p>I have this array:</p>
  
  <pre><code>$scope.damageEvants =
      [
         {"id":2, "StartDate":21/05/2012, EndDate:null},
         {"id":3, "StartDate":null, EndDate:02/09/2014},
         {"id":4, "StartDate":null, EndDate:null},
         {"id":5, "StartDate":21/05/2012, EndDate:null}
      ];
  </code></pre>
  
  <p>I want to filter(remove) all objects from array where property startDate and EndDate are null.</p>
  
  <p>The result after filtering:</p>
  
  <pre><code>$scope.damageEvants =
      [
         {"id":2, "StartDate":21/05/2012, EndDate:null},
         {"id":3, "StartDate":null, EndDate:02/09/2014},
         {"id":5, "StartDate":21/05/2012, EndDate:null}
      ];
  </code></pre>
  
  <p>I tried this:</p>
  
  <pre><code>$scope.damageEvants.filter(return item.StartDate!== null &amp;&amp; item.EndDate !== null  )
  </code></pre>
  
  <p>But it seem to be wrong way.</p>
  
  <p>How can filter <code>$scope.damageEvants</code> using filter function?</p>