const index = array.findIndex(item => item.id === 'your-id');
This should get you the index of item in array with id === your-id
array = [ {id:1}, {id:2} ];_x000D_
_x000D_
const index = array.findIndex(item => item.id === 2);_x000D_
_x000D_
console.log(index);
_x000D_