I have the following code: 

```
  function increment(index, type) {
    $scope.items[index].type++;
    console.log(type);
    console.log($scope.items[index].type);
  };

```

When I do `console.log(type)` I get the string right.

However, `console.log($scope.items[index].type)` returns a `NaN`.

Any idea how to add an argument to a list of array?