Help Curl, Javascript/NodeJs

Bonjour depuis quelle jour je me suis lancer dans le développement d’une app utilisant l’api te twitter et l’api spotify, après quelle jour a galérer pour automatiser l’obtention de mon l’access token spotify, je veux essayer de récupérer le tracks du top 1 des charts spotify jusqu’à la rien de dur utilisation de curl et de child process de node js :

let execPlaylist = 'curl -X GET "https://api.spotify.com/v1/playlists/37i9dQZEVXbIPWwFssbupI/tracks?limit=1&offset=0" -H "Authorization: Bearer ' + AccessToken.AccessToken + '"'

exec(execPlaylist, (err, stdout, stderr) => {
  if (err) {
    console.error(err);
    return;
  }
  console.log(stdout);
});

et cela me donne :

{
  "href" : "https://api.spotify.com/v1/playlists/37i9dQZEVXbIPWwFssbupI/tracks?offset=0&limit=1",
  "items" : [ {
    "added_at" : "1970-01-01T00:00:00Z",
    "added_by" : {
      "external_urls" : {
        "spotify" : "https://open.spotify.com/user/"
      },
      "href" : "https://api.spotify.com/v1/users/",
      "id" : "",
      "type" : "user",
      "uri" : "spotify:user:"
    },
    "is_local" : false,
    "primary_color" : null,
    "track" : {
      "album" : {
        "album_type" : "album",
        "artists" : [ {
          "external_urls" : {
            "spotify" : "https://open.spotify.com/artist/6Mm2g25BTeJ6BICPFWGkPg"
          },
          "href" : "https://api.spotify.com/v1/artists/6Mm2g25BTeJ6BICPFWGkPg",
          "id" : "6Mm2g25BTeJ6BICPFWGkPg",
          "name" : "Bosh",
          "type" : "artist",
          "uri" : "spotify:artist:6Mm2g25BTeJ6BICPFWGkPg"
        } ],
        "available_markets" : [ "AD", "AE", "AR", "AT", "AU", "BE", "BG", "BH", "BO", "BR", "CA", "CH", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "DZ", "EC", "EE", "EG", "ES", "FI", "FR", "GB", "GR", "GT", "HK", "HN", "HU", "ID", "IE", "IL", "IN", "IS", "IT", "JO", "JP", "KW", "LB", "LI", "LT", "LU", "LV", "MA", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "OM", "PA", "PE", "PH", "PL", "PS", "PT", "PY", "QA", "RO", "SA", "SE", "SG", "SK", "SV", "TH", "TN", "TR", "TW", "US", "UY", "VN", "ZA" ],
        "external_urls" : {
          "spotify" : "https://open.spotify.com/album/70FpaoDALiemmQYyx3X1z7"
        },
        "href" : "https://api.spotify.com/v1/albums/70FpaoDALiemmQYyx3X1z7",
        "id" : "70FpaoDALiemmQYyx3X1z7",
        "images" : [ {
          "height" : 640,
          "url" : "https://i.scdn.co/image/ab67616d0000b273fb9d17dc1e56e0df7a146588",
          "width" : 640
        }, {
          "height" : 300,
          "url" : "https://i.scdn.co/image/ab67616d00001e02fb9d17dc1e56e0df7a146588",
          "width" : 300
        }, {
          "height" : 64,
          "url" : "https://i.scdn.co/image/ab67616d00004851fb9d17dc1e56e0df7a146588",
          "width" : 64
        } ],
        "name" : "Synkinisi",
        "release_date" : "2020-05-29",
        "release_date_precision" : "day",
        "total_tracks" : 20,
        "type" : "album",
        "uri" : "spotify:album:70FpaoDALiemmQYyx3X1z7"
      },
      "artists" : [ {
        "external_urls" : {
          "spotify" : "https://open.spotify.com/artist/6Mm2g25BTeJ6BICPFWGkPg"
        },
        "href" : "https://api.spotify.com/v1/artists/6Mm2g25BTeJ6BICPFWGkPg",
        "id" : "6Mm2g25BTeJ6BICPFWGkPg",
        "name" : "Bosh",
        "type" : "artist",
        "uri" : "spotify:artist:6Mm2g25BTeJ6BICPFWGkPg"
      } ],
      "available_markets" : [ "AD", "AE", "AR", "AT", "AU", "BE", "BG", "BH", "BO", "BR", "CA", "CH", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "DZ", "EC", "EE", "EG", "ES", "FI", "FR", "GB", "GR", "GT", "HK", "HN", "HU", "ID", "IE", "IL", "IN", "IS", "IT", "JO", "JP", "KW", "LB", "LI", "LT", "LU", "LV", "MA", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "OM", "PA", "PE", "PH", "PL", "PS", "PT", "PY", "QA", "RO", "SA", "SE", "SG", "SK", "SV", "TH", "TN", "TR", "TW", "US", "UY", "VN", "ZA" ],
      "disc_number" : 1,
      "duration_ms" : 141893,
      "episode" : false,
      "explicit" : true,
      "external_ids" : {
        "isrc" : "FRZ052000117"
      },
      "external_urls" : {
        "spotify" : "https://open.spotify.com/track/0KBwGCY9RYD9t2zjeW4h48"
      },
      "href" : "https://api.spotify.com/v1/tracks/0KBwGCY9RYD9t2zjeW4h48",
      "id" : "0KBwGCY9RYD9t2zjeW4h48",
      "is_local" : false,
      "name" : "Djomb - Bien ou quoi",
      "popularity" : 83,
      "preview_url" : "https://p.scdn.co/mp3-preview/2a8c439be8947789e1b27acbcd18c17e40ae6fb8?cid=8f22024a4f144cd7b965b9db6e124e94",
      "track" : true,
      "track_number" : 16,
      "type" : "track",
      "uri" : "spotify:track:0KBwGCY9RYD9t2zjeW4h48"
    },
    "video_thumbnail" : {
      "url" : null
    }
  } ],
  "limit" : 1,
  "next" : "https://api.spotify.com/v1/playlists/37i9dQZEVXbIPWwFssbupI/tracks?offset=1&limit=1",
  "offset" : 0,
  "previous" : null,
  "total" : 50
}

donc je me demande comment en utilisant javascript je peux extraire des information tels que le nom du tracks et autre et le mettre par exemple dans une variable (je suis débutant en javascript et j’utilise cette application en grande parti pour apprendre le javascript)

Human Coders - Le centre de formation recommandé par les développeur·se·s pour les développeur·se·s