Iterating through two objects with different structures in parallel
You don't need the count variable to increment the index, Array.forEach accepts a second ( optional ) parameter which is the current index that you can use : 

stored.forEach((obj, index) =&gt; { 
   obj.value = input[index]; 
});


OR

stored = stored.map((obj, index) =&gt; ({...obj, value: input[index]}))


example : 



let stored = [{ name : 'a', value: 2 }, {name : 'b',  value: 4 }, { name : 'c',  value: 6 }];
let input = [10, 11, 12];


stored.forEach((obj, index) =&gt; { obj.value = input[index]; });

// OR
// stored = stored.map((obj, index) =&gt; ({...obj, value: input[index]}))

console.log(stored)