My data is sourced from an API and looks like this:
{
"ALBUMS":[
{
"ID":"1",
"TITLE":"'THE BEST OF"
},
{
"ID":"2",
"TITLE":"MADE IN ENGLAND"
},
],
"PLAYLISTS":[
{
"ID":"5",
"TITLE":"SUNSET SESSIONS"
},
"ID":"2",
"TITLE":"POOLSIDE SESSIONS"
}
],
}
I aim to display all titles with their respective types (album or playlist).
The current code I've written only displays the first child from albums and playlists:
<div v-for="(item, index) in items" :key="item.id">
<h1 class="category">{{index}}</h1>
<h1 class="title">{{item[0].title}}</h1>
The output I desire is:
Album
The Best Of
Album
Made In England
Playlist
Sunset Sessions
Playlist
Sunset Sessions