### Instructions:

 1. Go to [your Playlists page](https://music.youtube.com/library/playlists).
 2. Scroll to the bottom of the Playlists page (making sure that all your playlists have loaded).
 3. Press F12 to open your console.
 4. Paste this JavaScript into your console.
    ```
    const playlists = [];

    document.querySelectorAll("ytmusic-two-row-item-renderer").forEach(playlist => {
      const title = playlist.querySelector(".details > .title-group").innerText; 
      const url = playlist.querySelector("a").href;

      if(title !== "New playlist" && title !== "Your Likes")
        playlists.push({title, url});
    });
 5. (optional) To sort it, enter this:
    ```
    playlists.sort((a,b) => (a.title > b.title) ? 1 : ((b.title > a.title) ? -1 : 0));
 6. Do what you'd like with the array of objects. I provide a few options below.

<hr>

If you want the output in JSON form, just stringify it:

```
JSON.stringify(tracklistObj, null, '\t');
```

If you want a plain text version:

```
let myString = "";
playlists.forEach(list => myString += `${list.title} - ${list.url}\n`);
myString;
```

If you want to have the output be an HTML list:

```
let myHTML = "<ul>";
playlists.forEach(list => myHTML += `<li><a href="${list.url}" target="_blank">${list.title}</a></li>` );
myHTML += "</ul>";
```