I don't think this is really an angular question, although I stumbled upon the problem while working with an angular ng-repeat directive.

I'm trying to store javascript object literals into an array using push so I can iterate through that in ng-repeat.

For example:

```
$scope.items = [];

var item = {
   name: "bob"
};

$scope.items.push(item);
item.name = "mary";
$scope.items.push(item);

```

At this point, the $scope.items[] is holding 2 instances of the name Mary, instead of having both Bob and Mary. This is counter-intuitive as I thought push was supposed to just append the next item to the end of the array.

My real code (summarized) goes something like the below:

```
$scope.items = [];

var item = {
   name: "";
};

for (var i = 0; i < 10; i++) {
   // I dynamically set the item.name to some value using retrieved values from server
   item.name = someValueFromServer;

   $scope.items.push(item);
}

```

So, again, at the end of the for-loop, instead of having 10 different names, I have the SAME 10 names of the LAST one that was retrieved.

I couldn't quite figure out how to solve this, and wasn't able to find anything online either. I'm fairly new to this so it might've been I was searching for the wrong thing.

Any help would be awesome. Thanks so much!