title: How to set a property of each object inside an array of objects?
body: <p>I have this array as example:</p>
  
  <pre><code>array = [{id:3},{id:2},{id:4}]
  </code></pre>
  
  <p>I want to loop through this array of objects, and make each "id" from each object equal to its index position inside of the array, to make something like this:</p>
  
  <pre><code>array =[{id:0},{id:1},{id:2}]
  </code></pre>
  
  <p>Any idea of how can I do this?</p>
  
  <p>Thank you all for the attention!</p>