showing results for - "javascript set property for each object in array of objects"
Agustín
28 Aug 2017
1let yourArray = [{id:3},{id:2},{id:4}] 
2 yourArray.forEach((item, index) => { 
3 item.id = index 
4})