title: Remove the objects using index value in javascript or react
body: <p>Remove the objects using index value in javascript or react</p>
  <p>i have the object list like below. Deleting the object using index value</p>
  <pre><code>0: {Id: &quot;&quot;, value: &quot;aaa&quot; }
  1: {Id: &quot;&quot;, value: &quot;bbb&quot; }
  2: {Id: &quot;&quot;, value: &quot;ccc&quot; }
  3: {Id: &quot;&quot;, value: &quot;ddd&quot; }
  4: {Id: &quot;&quot;, value: &quot;eee&quot; }
  </code></pre>
  <p>deleted object using :</p>
  <pre><code>   var newArray = delete resultObject[0];
                  
                  this.setState({ result: resultObject});
               
                   console.log(&quot;setState  &quot;,this.state.result); 
  </code></pre>
  <p>Actual Result
  it showing results as</p>
  <pre><code>[ empty,{…}, {…}, {…}, {…}] 
   
  1: {Id: &quot;&quot;, value: &quot;bbb&quot; }
  2: {Id: &quot;&quot;, value: &quot;ccc&quot; }
  3: {Id: &quot;&quot;, value: &quot;ddd&quot; }
  4: {Id: &quot;&quot;, value: &quot;eee&quot; }
  </code></pre>
  <p>how to make starts from 0, after delete the index 0 .</p>
  <p>expected   Result</p>
  <pre><code>0: {Id: &quot;&quot;, value: &quot;bbb&quot; }
  1: {Id: &quot;&quot;, value: &quot;ccc&quot; }
  2: {Id: &quot;&quot;, value: &quot;ddd&quot; }
  3: {Id: &quot;&quot;, value: &quot;eee&quot; }
  </code></pre>
  <p>After delete i try to make index starts from 0 not from 1</p>