Typescript Replace Object In Array Javascript Push Method In Python