Typescript Unique In Array Javascript Iteration