Indexof Array Javascript Object Destructuring