title: Accessing string array values in a v-for loop in Vue.js
body: <p>I need to get string values out of an array in a function. My declared component in my template is as follows:</p>
  
  <pre><code>&lt;video-preview v-for="video in playlist" vid-id="how-do-I-get-the-string
    -value-from-the-playlist-for-this-iteration"&gt;&lt;/video-preview&gt;
  </code></pre>
  
  <p>Here is where <code>playlist</code> is declared in my <code>data() { return {} }</code> in my .vue file: </p>
  
  <pre><code>playlist: [
    'videoID1',
    'videoID2',
  ],
  </code></pre>
  
  <p>And here is my function in the <code>methods</code> section of the same .vue file:</p>
  
  <pre><code>playImageModal(video) {
    Analytics('content_viewed', vidId)
    // other functionality to play the video
  }
  </code></pre>
  
  <p>I need to pass the current value of the <code>playlist</code> array into the <code>Analytics()</code> function in <code>playImageModal()</code>, however, I'm not quite sure how to access that value. I've looked at Vue.js documentation, and it is easy enough to do when my <code>playlist</code> array holds generic objects verses holding strings... I simply would do <code>video.nameOfObjectAttribute</code> when setting my <code>vid-id</code> value in my template. But how do I access these values when there is an array of strings?</p>