function findUIDItemInArr(item, userArray){
    for(var i = 0; i < userArray.length; i++){
      if(userArray[i].uid == item){
        //console.log("Found item: " + item);
        return i;
      }
    }
    return -1;
  }
//update or remove it from the userArr array.
update or remove it from the userArr array.
update or remove it from the userArr array .
function findUIDItemInArr(item, userArray){
    for(var i = 0; i < userArray.length; i++){
      if(userArray[i].uid == item){
        return i;
      }
    }
    return -1;
  }
function findUIDItemInArr ( item , userArray ) { for ( var i = 0 ; i < userArray . length ; i ++ ) { if ( userArray [ i ] . uid == item ) { return i ; } } return - 1 ; }
update or remove it from the userArr array.
update or remove it from the userArr array .
//console.log("Found item: " + item);