How to remove JavaScript array element and reset keys
<p>I have an array like below:</p>

<pre><code> var fields = [
    {name:"mark", age:"23"}, 
    {name:"smith", age:"28"}, 
    {name:"kelvin", age:"25"}, 
    {name:"micheal", age:"22"}
];
</code></pre>

<p>I understand that fields will now have index/keys 0,1,2,3</p>

<p>How do I delete index 2 and reset keys so that we now have 0,1,2 instead of 0,1,3 </p>