title: How to bind element with ng-model from an object array key
body: <p>This is the scenario</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>angular.module('myApp', [])
  .controller('bookCtrl', function($scope) {
      $scope.book = {
          name: 'Session Invites',
          friends: [
               {'id': 1, 'name': 'raju' },
              {'id': 2, 'name': 'radha' },
              {'id': 3, 'name': 'luttappi' },
              ]
      };
      $scope.update = function(){ 
          $scope.book.friends[1] = {'id': 2, 'name': 'sam' };
          alert($scope.book.friends[1].name );
      };
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div ng-controller="bookCtrl"&gt;
      &lt;input type="text" ng-model="book.friends[1].name"/&gt;
      &lt;input type="button" id="btn" name="btn" value="update" ng-click="update()"/&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I would like to use "id" instead of array "index". <a href="http://jsfiddle.net/v4mh979u/" rel="nofollow">fiddle</a></p>
  
  <pre><code>&lt;input type="text" ng-model="book.friends[1].name"/&gt;
  </code></pre>