title: Updating a variable attribute with backbone's set method
body: <p>I need to update one attribute of a model after an event has been triggered from the view. I do not know which attribute will have to be updated beforehand. How can I set a variable attribute with backbone's set method?</p>
  
  <p>Here is an example set of attributes for my model:</p>
  
  <pre><code>defaults: { 
              content: 'Stupid filthy Hobbit',
              date: '03-19-14',
              position: [ 
                          {top: 134, left: 22},
                          {top: 78,  left: 24},
                          {top: 91,  left: 18}  
                        ]
            } 
  </code></pre>
  
  <p>Here is the method I use in the view:</p>
  
  <pre><code>events: {
      'change input': 'onChangePosition'
  },
  
  onChangePosition: function(e){
  
      var key = $(e.currentTarget).data('key');
      var attribute = $(e.currentTarget).data('attribute');
      var value = $(e.currentTarget).val();
  
      this.model.set(['position'][key][attribute], value);
  }
  </code></pre>