Search code examples
vuejs2storevuexv-for

VueJS v-for An Array of Key:Values From Store Using a Method


How can I use v-for to get an array of key:values from a store using a method?

The CodePen is available here

I appreciate any help.

P.S. I've been on SO for 10yrs and someone/somehow deleted my account. So, I'm starting anew.


Solution

  • Adding v-for="(item, index) in array" will extract the values from the index.

    Update: globalHours()[index] replaces globalHours()