Below is the code snippet I am working with:
<article class="project-card"
v-for="item in en.projects"
Additionally, here are some import statements:
import fr from '../assets/datas/fr.json'
import en from '../assets/datas/en.json'
export default {
data () {
return {
languageActive: 'en',
en: en,
fr: fr,
If 'languageActive' is set to 'en', I intend to use 'en.projects' in the v-for loop.
If 'languageActive' is set to 'fr', I intend to use 'fr.projects' in the v-for loop.
However, I have come across information stating that using a v-if with v-for is not advisable.
Any suggestions on how I can achieve this? Thank you!