title: How do I get all data from a form using Vue
body: <p>I've the following markup. </p>
  
  <pre><code>&lt;div class="checkbox"&gt;
    &lt;label&gt;
      &lt;input class="weekdays" name="wednesday[]" v-model="wed.selected" id="wednesday" type="checkbox"&gt; Wed &amp;nbsp; &amp;nbsp;
    &lt;/label&gt;
  &lt;/div&gt;
  &lt;div class="checkbox"&gt;
    &lt;label&gt;
      &lt;input class="weekdays" name="thursday[]" v-model="thu.selected" id="thursday" type="checkbox"&gt; Thu &amp;nbsp; &amp;nbsp;
    &lt;/label&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Similarly for all other days of the week. And in the Vue instance: </p>
  
  <pre><code>new Vue({
      el: '#provider',
      data: {
          mon: {selected: false, day: 'Mondays'},
          tue: {selected: false, day: 'Tuesdays'},
          wed: {selected: false, day: 'Wednesdays'},
          thu: {selected: false, day: 'Thursdays'},
          fri: {selected: false, day: 'Fridays'},
          sat: {selected: false, day: 'Saturdays'},
          sun: {selected: false, day: 'Sundays'},
          weekends: {selected: false, day: 'Weekends'},
          weekdays: {selected: false, day: 'Weekdays'},
          fromTime: '',
          toTime: '',
          selectedDays:[{
              days : [],
              from: '',
              to:''
          }]
  
      },
      methods: {
          addAvailability: function() {
              if(this.mon.selected)
              {
                  var days = [];
                  days.push(this.mon.day);
                  this.selectedDays['days'].push(days);
              }
          }
      }
  });
  </code></pre>
  
  <p>But this seems not working. What I'm trying to do here is when I click on a button, I want to add all checked days and time in to a variable <code>selectedDays</code> and add it to a hidden input field (json serialize the data).But what I've tried is not working well. </p>
  
  <p>Can anybody direct me to the right direction? I've spent 3 days and I couldn't figure out how to fix this. </p>