I am currently working on an application that involves a list of folders, each containing various files. The goal is to display these files when a specific folder is chosen. On the left side, users will see a list of folders and on the right side, the respective files will be displayed upon selection.
My JSON data structure looks like this:
folders : [
{id: 0, name: 'Animals', files:['cat.jpg','dog.jpg']},
{id: 1, name: 'Birds',files:['crow.jpg','sparrow.jpg']},
{id: 2, name: 'Area',files:['desert.jpg','river.jpg']}
]
For example, if the user selects the 'Animals' folder, they will see two files listed on the right side.
Here's a visual representation:
https://i.sstatic.net/fXx0c.png
As someone new to Vue.js, I'm curious about how to implement this functionality. Any guidance would be much appreciated!