title: Assign data with method to vue data variable dynamic
body: <p>How can I assign data to a dynamic variable.</p>
  
  <p>What I'm trying to achieve is this:</p>
  
  <p>My vue data variable:</p>
  
  <pre><code>test: '',
  </code></pre>
  
  <p>Adding a click</p>
  
  <pre><code>&lt;div @click="assignData(test)"
  </code></pre>
  
  <p>Method:</p>
  
  <pre><code>assignData(value) {
     // Now I don't want this
     this.test = 'lorem..';
  
     // Instead I want something like this
    value = 'new value for test';
  
    // Or
    this.value = 'new value for test';
  }
  </code></pre>
  
  <p>Now obviously this is not gonna work, but I hope you'll get the idea.</p>
  
  <p>I need to change many variables and I don't want to add all the variables in the function like this</p>
  
  <pre><code>assignData(value) {
  
     this.test = 'lorem..';
     this.anotherVar = 'ipsum';
     this.newTest = '....';       
  }
  </code></pre>