title: Vue.js, emit multiple parameters from child to parent
body: <p>I am trying to emit multiple parameters from child to parents.What is the best way to do it.</p>
  <p><strong>Child</strong></p>
  <pre><code> getUpdated(value, type) {
                    
      if (type === 'students') {
       this.students = value.map(val =&gt; val.id);
      }
                    
      if (type === 'programs') {
       this.programs = value.map(val =&gt; val.code);
      }
      this.$emit('selectedOptions', students:this.students, programs:this.programs );
      },
  </code></pre>
  <p><strong>Parent</strong></p>
  <pre><code> onSelectedOption(students, programs) {
      if (students !== undefined || students.length &gt; 1) {
        this.students = students;
    } 
    if (programs !== undefined || programs.length &gt; 1) {
      this.programs = programs;
    }
  },
  </code></pre>