Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

470
Views
Vue array in array change index for secod array

I have an array:

[{ title: 'title 1', options: ['a', 'b'] },
{ title: 'title 2', options: ['c', 'd'] },
{ title: 'title 3', options: ['e', 'f'] }]

And I render this array using v-for:

<div v-for="(item, i) in content" :key="item.title">
    <div>
        <div>{{ item.title }}</div>
        <div :class="{'selected-item': i === selectedIndex}">
            {{ item.options[selectedOptionIndex] }}
        </div>
    </div>
</div>

When I change the value of the selectedOptionIndex, it changes for each index (for title 1, title 2 and title 3). I want change option only for e.g title 1. How I can fix it?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!