title: Angular - array forEach index
body: <p>How to identify the index for the <code>forEach</code> loop in the Angular4 code.</p>
  
  <p>I need to splice the record inside the foreach based on the condition.</p>
  
  <pre><code>angular.forEach(myObject =&gt; {
      if(!myObject.Name)
          myObject.splice(..., 1)
  };
  </code></pre>
  
  <p>Here I want to delete the object if the name in <code>myObject</code> is blank.</p>