I'm trying to find the index of my object inside an array in Javascript.
This is the code I'm using, this returns -1 so it's not found. But it's there
var index = this.state.users.indexOf(user);
The object I'm comparing with is identical to the one's in the collection as shown in the picture below
I'm using this code to compare the two
console.log(this.state.users[0]);
console.log(member);
So I don't understand why this is giving a negative result