title: How to implement multiple counter in VueJS
body: <p>I'm a beginner and I'm working on a little exercice right now where I need to implement a function that will vote for a specific picture every time we click on the "Vote" button.</p>
  
  <p><a href="https://i.stack.imgur.com/CgrDy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CgrDy.png" alt="enter image description here"></a></p>
  
  <p>Here is what it looks like, for example if I click on the first button, I need to increment the number of vote for this picture.
  Here is what i did :</p>
  
  <pre><code>&lt;div id="display" class="container"&gt;
      &lt;table class="w3-table-all" id="tableDisplay"&gt;
        &lt;tr&gt;
          &lt;th&gt;Cat&lt;/th&gt;
          &lt;th&gt;Vote&lt;/th&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
      &lt;div v-for="display in gridData"&gt;
      &lt;table class="w3-striped w3-table-all table table-bordered" id="tableDisplay"&gt;
        &lt;tr class="w3-hover-light-grey"&gt;
          &lt;th&gt;
            &lt;img :src="display.url" height="200px" width="300px"/&gt;
          &lt;/th&gt;
          &lt;th&gt;
            &lt;button class="w3-button w3-green w3-hover-light-green"v-on:click="test(display.counter,display.id)" v-bind:id="display.id"&gt;Vote !&lt;/button&gt;
          &lt;/th&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
  
    &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>And the vueJs part :</p>
  
  <pre><code>new Vue({
  
  
  el :'#display',
    data: {
      gridData :[
      {
          "url": "http://24.media.tumblr.com/tumblr_m82woaL5AD1rro1o5o1_1280.jpg",
          "id": "MTgwODA3MA",
          "counter" : 0
      },
      {
          "url": "http://24.media.tumblr.com/tumblr_m29a9d62C81r2rj8po1_500.jpg",
          "id": "tt",
          "counter" : 0
  
      }
    ],
  },
    methods:{
      test: function(count,id){
        count ++;
        alert(count);
      }
    },
  })
  </code></pre>
  
  <p>And the problem is that it doesn't update the change, in the "counter" section it still at 0.</p>
  
  <p>Thank you for any help.</p>