title: Vue Removing Item From Array on Click Without Knowing Arrays Name?
body: <p>I am trying to add functionality of removing an item from an array when something is clicked. I currently have:</p>
  
  <pre><code>&lt;span @click="deleteItem(index)" v-for="(item, index) in customTaxonomies.featured" v-html="item"&gt;&lt;/span&gt;
  </code></pre>
  
  <p>And then in my methods I have:</p>
  
  <pre><code>deleteItem: function(index) {
     this.customTaxonomies.featured.splice(index, 1);
  }
  </code></pre>
  
  <p>So this works, but the array I want to effect needs to be known in my method to do this (customTaxonomies.featured). Is there a way to pass the name of the array I want to target through the v-for loop like I am doing with index?</p>
  
  <p>So possibly something like this:</p>
  
  <pre><code>&lt;span @click="deleteItem(index, arrayName)" v-for="(item, index, arrayName) in customTaxonomies.featured" v-html="item"&gt;&lt;/span&gt;
  </code></pre>
  
  <pre><code>deleteItem: function(index, arrayName) {
     this.arrayName.splice(index, 1);
  }
  </code></pre>
  
  <p>Or pass the name of the array through a prop or something from the frontend? My main goal is passing the name of the array I want to delete the item from, using the frontend of my application.</p>