title: How to write to observable by name?
body: <p>I'm writing a form filling page using Knockout and based on some old html forms, everything is good but the html forms have a button to copy a set of address data from one set of inputs to another, I'm trying to duplicate similar functionality in my ViewModel using this function:</p>
  
  <pre><code>self.CopyData = function (source, target) {
      for (var i = 0; i &lt; source.length; i++) {
          self[target[i]] = self[source[i]];
      };
  };
  </code></pre>
  
  <p>Where source and target are arrays of strings. </p>
  
  <p>However I think that this is going to fail as I'm not writing to the knockout observable instead I'm overwriting it with a value. However I haven't found out how to do this the right way. From the documentation:</p>
  
  <blockquote>
    <p>To write a new value to the observable, call the observable and pass
    the new value as a parameter. For example, calling
    myViewModel.personName('Mary') will change the name value to 'Mary'.</p>
  </blockquote>
  
  <p>How do I write to a Knockout observable by name?</p>