Typescript Replace Object In Array Javascript Push Method In Array