[Vuejs]-Get data from an Array in Vue

0👍

Depends on what html element you want to use for rendering the values, you may use a v-for directive to rendering the project_name values:

<template>
  <ul id="example">
    <li v-for="(media) in medias">
      {{ media.project_name }}
    </li>
  </ul>
</template>

You are going to need to get the medias data from your store, you may get it using a computed property:

<script>
export default {
  computed: {
    medias: function () {
      return this.$store.medias
    }
  }
}
</script>

Example above is assuming you are using single file component structure.

Leave a comment