title: how to remove javascript array element?
body: <p>I have an array of objects and I am removing elements based on object value, without knowing which element it is.</p>
  
  <p>So... those lovely people who flagged my question as duplicate and suggest I read <a href="https://stackoverflow.com/questions/5767325/remove-a-particular-element-from-an-array-in-javascript">How do I remove a particular element from an array in JavaScript?</a> are not helping.</p>
  
  <p>My question... again...</p>
  
  <p><em>I have an array of objects</em></p>
  
  <ul>
  <li><p>I want to search and remove specific elements from the array. I have a solution that is long winded (loop thru the array once, make a list of element id's, then slice one by one in another loop). I am hoping there is another method (enhance my skillset too).</p>
  
  <pre><code>myarray.filter(function(item)
  {
      if( item.flag==="Y" )
      {
          // how to delete element from myarray
          // delete implies remove it from myarray
      }
  });
  </code></pre></li>
  </ul>
  
  <p>All help appreciated =)</p>