0

I'm using OneGraph to pull data from Spotify. I can't figure how to render out the 3rd nested loop though even looking at other Vue code samples. I'm trying to return the artist name for each playlist as shown below.

<template>
    <ul>
        <li v-for="(item, index) in $page.oneGraph.spotify.me.playlists" :key="index">
            <ol>
                <li v-for="track in item.tracks" :key="track.playlists">
                    {{track.name}} -
                    <span v-for="artist in item.tracks.artists" :key="artist.tracks">
                        {{artist.name}}
                    </span>
                </li>
            </ol>
        </li>
    </ul>
</template>

The query:

{
  spotify {
    me {
      id
      playlists(limit: 1) {
        name
        tracks {
          name
          artists {
            name
          }
        }
      }
    }
  }
}
scottrod
  • 477
  • 1
  • 8
  • 21
  • And for the 3rd for loop: `` – scottrod Jul 27 '20 at 22:49
  • if that really solves your question then answer your own question. – Rohit Ambre Jul 28 '20 at 05:08