Remove element from array

Hello kirupers,

i am trying to remove elements form an array.
the array is kind of special: content depends on what you have clicked or not:

see some code:

pArr = [];
for(var i =0;i<max;i++){
johndoe*.pressed = false;
johndoe*.onPress = function(){
this.pressed = !this.pressed;
if(this.pressed){
pArr.push(this.obj)
}else{
pArr.remove(this.obj);
}
}
}

of course the remove function is my pb, not done yet.

i have tested some proto on it, but cannot figure it properly.

How can i remove the same object from the array, knowing that the array can contain several times the same object, so i do not want to delete it many times but just the good one ? so the trick is to remove only the object associated with the johndoe button.

maybe the pb comes from the way i push the elements ?

thx for your reading so far, hope this is an understanding problem.
tofu.