Typescript For Each Array Element Update