This function returns the same value in the array list.

For example if `i=10`, then my array should contain 10 different values, but it stores only the last value 10 times. 

What is the problem in my code? 

```
$scope.webTempIds=[];
$scope.wId={};
$scope.getIds=function(){
  for(var i=0;i<$rootScope.retData.length;i++){
    $scope.wId.ID=$rootScope.retData[i].WEBUI_TEMP_ID;
    $scope.webTempIds.push($scope.wId);
  }
  return $scope.webTempIds;
}

```