Personagraph interview question

removing duplicate item in an array