HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URLs added here will be added as <link>
s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
Search for and use JavaScript packages from npm here. By selecting a package, an import
statement will be added to the top of the JavaScript editor for this package.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
Paste your results from Spotify here:
<br><br>
<textarea>
{
"items": [
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/4mLJ3XfOM5FPjSAWdQ2Jk7"
},
"followers": {
"href": null,
"total": 211712
},
"genres": [
"alternative rock",
"chamber pop",
"folk-pop",
"freak folk",
"funk",
"garage rock",
"indie folk",
"indie pop",
"indie rock",
"indietronica",
"lo-fi",
"modern rock",
"neo-psychedelic",
"new americana",
"shimmer pop",
"stomp and holler"
],
"href": "https://api.spotify.com/v1/artists/4mLJ3XfOM5FPjSAWdQ2Jk7",
"id": "4mLJ3XfOM5FPjSAWdQ2Jk7",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/15120fbb157873832c339c8f7cbaa3bce691f451",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/d50e4c29fbb3e8ade8b2419daf3468b371ca0fb6",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/f0e7f6ec1be9dbd68460fac720070c8f048c4385",
"width": 160
}
],
"name": "Dr. Dog",
"popularity": 61,
"type": "artist",
"uri": "spotify:artist:4mLJ3XfOM5FPjSAWdQ2Jk7"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/2WjvvwAX0mdWwq3aFuUdtc"
},
"followers": {
"href": null,
"total": 410675
},
"genres": [
"reggae rock"
],
"href": "https://api.spotify.com/v1/artists/2WjvvwAX0mdWwq3aFuUdtc",
"id": "2WjvvwAX0mdWwq3aFuUdtc",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/ca11281f61b27f3d7c1d74f1e622e18a4b9fa881",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/f895c99b46944a2469dc3b8fa9cb2048fb89ca55",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/671f0403ce5ae092545e89ddf2cc29ba714979ad",
"width": 160
}
],
"name": "Rebelution",
"popularity": 68,
"type": "artist",
"uri": "spotify:artist:2WjvvwAX0mdWwq3aFuUdtc"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/73sIBHcqh3Z3NyqHKZ7FOL"
},
"followers": {
"href": null,
"total": 3474031
},
"genres": [
"hip hop",
"pop rap",
"rap"
],
"href": "https://api.spotify.com/v1/artists/73sIBHcqh3Z3NyqHKZ7FOL",
"id": "73sIBHcqh3Z3NyqHKZ7FOL",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/0ac898747b4ad4c4faf6025221a95266e04bf972",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/b51d5cb42b166784f4e1e1e2ef8e87e0135f0f9e",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/5f0bb754710ffd901940dcfa375ca4129b3db996",
"width": 160
}
],
"name": "Childish Gambino",
"popularity": 83,
"type": "artist",
"uri": "spotify:artist:73sIBHcqh3Z3NyqHKZ7FOL"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/2dI9IuajQnLR5dLxHjTTqU"
},
"followers": {
"href": null,
"total": 53354
},
"genres": [],
"href": "https://api.spotify.com/v1/artists/2dI9IuajQnLR5dLxHjTTqU",
"id": "2dI9IuajQnLR5dLxHjTTqU",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/a753df7e4300d1412e50e664ad0b4986c9d9742c",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/3d05949adf62cf23c47f536dd0b7fea60a78f63d",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/142db54e80185031975c0c61ebfb924c064f12f9",
"width": 160
}
],
"name": "The Polish Ambassador",
"popularity": 48,
"type": "artist",
"uri": "spotify:artist:2dI9IuajQnLR5dLxHjTTqU"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/0Vw76uk7P8yVtTClWyOhac"
},
"followers": {
"href": null,
"total": 281628
},
"genres": [
"indie r&b",
"vapor soul"
],
"href": "https://api.spotify.com/v1/artists/0Vw76uk7P8yVtTClWyOhac",
"id": "0Vw76uk7P8yVtTClWyOhac",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/456441f51d4bdc22c77dd077aba79ff9dc8a9055",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/f3d33194955f7d7a1ffc38de71ae2a380692b2a2",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/9377e7f7b8af47a620498fb9e1459ba7a1a1b8ad",
"width": 160
}
],
"name": "HONNE",
"popularity": 67,
"type": "artist",
"uri": "spotify:artist:0Vw76uk7P8yVtTClWyOhac"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/1GAS0rb4L8VTPvizAx2O9J"
},
"followers": {
"href": null,
"total": 419359
},
"genres": [
"alternative hip hop",
"conscious hip hop",
"hip hop",
"pop rap"
],
"href": "https://api.spotify.com/v1/artists/1GAS0rb4L8VTPvizAx2O9J",
"id": "1GAS0rb4L8VTPvizAx2O9J",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/26cc28fbb8f9ea508a2e9a137d8fcc64c47b7ac9",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/50a639e93c4dc3852df903f7e6bb2ba329b71503",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/e707b4cbda0419f4cb30bc63c42340b536eb18be",
"width": 160
}
],
"name": "Atmosphere",
"popularity": 59,
"type": "artist",
"uri": "spotify:artist:1GAS0rb4L8VTPvizAx2O9J"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/20JZFwl6HVl6yg8a4H3ZqK"
},
"followers": {
"href": null,
"total": 4505527
},
"genres": [
"emo",
"modern rock",
"pop punk",
"vegas indie"
],
"href": "https://api.spotify.com/v1/artists/20JZFwl6HVl6yg8a4H3ZqK",
"id": "20JZFwl6HVl6yg8a4H3ZqK",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/58518a04cdd1f20a24cf0545838f3a7b775f8080",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/e71f9ba6573c95041ecd71f766788668f1ceb998",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/5b0544b8a3898be8693915ef7bffb216f781d23d",
"width": 160
}
],
"name": "Panic! At The Disco",
"popularity": 84,
"type": "artist",
"uri": "spotify:artist:20JZFwl6HVl6yg8a4H3ZqK"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/5XenQ7XfcvQdfIbpLEFaKQ"
},
"followers": {
"href": null,
"total": 359701
},
"genres": [
"hip hop",
"indie r&b",
"pop rap",
"rap",
"underground hip hop"
],
"href": "https://api.spotify.com/v1/artists/5XenQ7XfcvQdfIbpLEFaKQ",
"id": "5XenQ7XfcvQdfIbpLEFaKQ",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/5200febf3c2334d7b392efd05ac73f1da05255b6",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/61f16798b22fb3aaabe6a3796bc71c500805ea43",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/ae5472b620071b3d62621953aecbecf742fec456",
"width": 160
}
],
"name": "GoldLink",
"popularity": 70,
"type": "artist",
"uri": "spotify:artist:5XenQ7XfcvQdfIbpLEFaKQ"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/6tkrcmVfWoHC4WOhE7IDyq"
},
"followers": {
"href": null,
"total": 11980
},
"genres": [],
"href": "https://api.spotify.com/v1/artists/6tkrcmVfWoHC4WOhE7IDyq",
"id": "6tkrcmVfWoHC4WOhE7IDyq",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/5fd63c02733582bdbda48aebf22c49fe1ecf0881",
"width": 640
},
{
"height": 300,
"url": "https://i.scdn.co/image/9e2d448011d87f2211f49581bda3b8428ceb172c",
"width": 300
},
{
"height": 64,
"url": "https://i.scdn.co/image/ca76ac96b1b2045e6fb7e2378d68b1195764fc63",
"width": 64
}
],
"name": "Lost Dog Street Band",
"popularity": 40,
"type": "artist",
"uri": "spotify:artist:6tkrcmVfWoHC4WOhE7IDyq"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/6ZreVUHffpj7WprfTK69Fu"
},
"followers": {
"href": null,
"total": 2630
},
"genres": [],
"href": "https://api.spotify.com/v1/artists/6ZreVUHffpj7WprfTK69Fu",
"id": "6ZreVUHffpj7WprfTK69Fu",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/214aae98e7b7f541a764d3bea03f8081b149ff79",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/b11a11b359d898d2c5e56e08829340dc440c2d10",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/aacedbb943eaa1cca5b7b2f4e82dfd34c2e77ed0",
"width": 160
}
],
"name": "Young Monks",
"popularity": 33,
"type": "artist",
"uri": "spotify:artist:6ZreVUHffpj7WprfTK69Fu"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/00Z3UDoAQwzvGu13HoAM7J"
},
"followers": {
"href": null,
"total": 178908
},
"genres": [
"indie pop rap",
"pop",
"pop rap",
"rap"
],
"href": "https://api.spotify.com/v1/artists/00Z3UDoAQwzvGu13HoAM7J",
"id": "00Z3UDoAQwzvGu13HoAM7J",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/9cead21f4d4bbcfa10dee7320d25e83025d92c07",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/f65e5500e05c137e2e837a807869fe4b5b437583",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/ae934d556db52c826ea91ac03cc220b47ac68ac3",
"width": 160
}
],
"name": "Skizzy Mars",
"popularity": 63,
"type": "artist",
"uri": "spotify:artist:00Z3UDoAQwzvGu13HoAM7J"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/1ikg4sypcURm8Vy5GP68xb"
},
"followers": {
"href": null,
"total": 30777
},
"genres": [
"indie pop",
"indie psych-rock",
"indietronica",
"vapor soul"
],
"href": "https://api.spotify.com/v1/artists/1ikg4sypcURm8Vy5GP68xb",
"id": "1ikg4sypcURm8Vy5GP68xb",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/cd35e8a95a27d9cec783356db77f76edc206cbe5",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/68623758281bc1c2f211c8d6e9dcbb4f3fd59c8f",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/4019f9cd44ca4727e73903faa58fbefb335586f0",
"width": 160
}
],
"name": "Magic City Hippies",
"popularity": 49,
"type": "artist",
"uri": "spotify:artist:1ikg4sypcURm8Vy5GP68xb"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/0J626PVezyRujeAfXAssnH"
},
"followers": {
"href": null,
"total": 12746
},
"genres": [
"aussietronica",
"deep australian indie"
],
"href": "https://api.spotify.com/v1/artists/0J626PVezyRujeAfXAssnH",
"id": "0J626PVezyRujeAfXAssnH",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/ea00a9cef679b6f234d5f3ce566ae7aa0e64a08e",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/df4beb41dc65dfac922730963a63a1dad97e18c8",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/2fa2d5de93dd73416a4610cd88d284bddb7ddd7f",
"width": 160
}
],
"name": "Slum Sociable",
"popularity": 47,
"type": "artist",
"uri": "spotify:artist:0J626PVezyRujeAfXAssnH"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/1SFz3S9eSUTc49ysstadiO"
},
"followers": {
"href": null,
"total": 30023
},
"genres": [
"aussietronica",
"australian hip hop",
"deep australian indie"
],
"href": "https://api.spotify.com/v1/artists/1SFz3S9eSUTc49ysstadiO",
"id": "1SFz3S9eSUTc49ysstadiO",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/6f891b87731dab785f93c182e8b7472861ee0292",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/e19e0fa4a09e65fb7083bee3b2f3a95152eb7500",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/977ea6b2db957c532f6a35461c2aed89bd199a88",
"width": 160
}
],
"name": "Boo Seeka",
"popularity": 50,
"type": "artist",
"uri": "spotify:artist:1SFz3S9eSUTc49ysstadiO"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/1jZfA0AdL9iA5PPLwoVvy1"
},
"followers": {
"href": null,
"total": 4546
},
"genres": [
"australian garage punk",
"deep australian indie"
],
"href": "https://api.spotify.com/v1/artists/1jZfA0AdL9iA5PPLwoVvy1",
"id": "1jZfA0AdL9iA5PPLwoVvy1",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/632f4437b5a0f91bf8377509d0329e536a007c16",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/a9387326e6c6ac5341a81492a1fa54616136890a",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/66e05fa1251a005126e24739db26e6938e51ac40",
"width": 160
}
],
"name": "Great Gable",
"popularity": 39,
"type": "artist",
"uri": "spotify:artist:1jZfA0AdL9iA5PPLwoVvy1"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/2iKr96W2DghBuLMVMYAtCI"
},
"followers": {
"href": null,
"total": 5349
},
"genres": [],
"href": "https://api.spotify.com/v1/artists/2iKr96W2DghBuLMVMYAtCI",
"id": "2iKr96W2DghBuLMVMYAtCI",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/03eb4ff5f9ef753662af32d9ab2165eb413effe1",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/5c1f35a53d736cd28e0265f335747dc3d7e75146",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/0652621dc388882bd874c2dfd10e9730eecd2520",
"width": 160
}
],
"name": "Lyall Moloney",
"popularity": 38,
"type": "artist",
"uri": "spotify:artist:2iKr96W2DghBuLMVMYAtCI"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/4WCnYYTO46t5FujuWKOc4W"
},
"followers": {
"href": null,
"total": 2941
},
"genres": [],
"href": "https://api.spotify.com/v1/artists/4WCnYYTO46t5FujuWKOc4W",
"id": "4WCnYYTO46t5FujuWKOc4W",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/90c0ac8c141b33e9ba567418a93c54c38db5a645",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/009b3d127d14d0d143cd0342ef5044da0f825833",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/77670af18d4083e0b935d38502cbe955eec89e6c",
"width": 160
}
],
"name": "Summer Thieves",
"popularity": 31,
"type": "artist",
"uri": "spotify:artist:4WCnYYTO46t5FujuWKOc4W"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/6yrtCy4XJHXM6tczo4RlTs"
},
"followers": {
"href": null,
"total": 17393
},
"genres": [
"aussietronica",
"australian garage punk",
"deep australian indie"
],
"href": "https://api.spotify.com/v1/artists/6yrtCy4XJHXM6tczo4RlTs",
"id": "6yrtCy4XJHXM6tczo4RlTs",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/ac14d2de104167126dbdb5fb211d5157e17d5f58",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/fd1332837a3ef5ddc6f11945ccb9b9b0abc0a038",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/a2c4350e0c617b1870f2c2b771ba55312aa3ad60",
"width": 160
}
],
"name": "Lime Cordiale",
"popularity": 47,
"type": "artist",
"uri": "spotify:artist:6yrtCy4XJHXM6tczo4RlTs"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/1Bl6wpkWCQ4KVgnASpvzzA"
},
"followers": {
"href": null,
"total": 463380
},
"genres": [
"boy band",
"hip hop",
"indie r&b",
"rap"
],
"href": "https://api.spotify.com/v1/artists/1Bl6wpkWCQ4KVgnASpvzzA",
"id": "1Bl6wpkWCQ4KVgnASpvzzA",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/707005c12d76bbdda637980fc187461438487c86",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/6da37ffe6a2ca4def982fbebb885268b2d27fab0",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/e9034910b1f07717bf159e9c2738107602b24597",
"width": 160
}
],
"name": "BROCKHAMPTON",
"popularity": 74,
"type": "artist",
"uri": "spotify:artist:1Bl6wpkWCQ4KVgnASpvzzA"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/3YKnhxu6ruaH7ubzxuobrr"
},
"followers": {
"href": null,
"total": 1762
},
"genres": [],
"href": "https://api.spotify.com/v1/artists/3YKnhxu6ruaH7ubzxuobrr",
"id": "3YKnhxu6ruaH7ubzxuobrr",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/3ae2638b16b2fa1a8d8e94c20ce62737aaf83a3c",
"width": 640
},
{
"height": 300,
"url": "https://i.scdn.co/image/8facb0be889ce129653cd3ac6acbd9a0347e391f",
"width": 300
},
{
"height": 64,
"url": "https://i.scdn.co/image/64511b8c6afe8af4756f8fac0adea5abf4bb1433",
"width": 64
}
],
"name": "Rambutan Jam Band",
"popularity": 28,
"type": "artist",
"uri": "spotify:artist:3YKnhxu6ruaH7ubzxuobrr"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/4RnBFZRiMLRyZy0AzzTg2C"
},
"followers": {
"href": null,
"total": 441139
},
"genres": [
"hip hop",
"rap"
],
"href": "https://api.spotify.com/v1/artists/4RnBFZRiMLRyZy0AzzTg2C",
"id": "4RnBFZRiMLRyZy0AzzTg2C",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/0e2e74dcf551320b9a27132d6f0648c068214a7b",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/e2a9d4d4eef2f51dc26f846209eb76b21c78ea34",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/0219a85cff8e0625b59418ab7620516b7feed113",
"width": 160
}
],
"name": "Run The Jewels",
"popularity": 64,
"type": "artist",
"uri": "spotify:artist:4RnBFZRiMLRyZy0AzzTg2C"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/2cScEQkwCAObAfeFX4CYr4"
},
"followers": {
"href": null,
"total": 17475
},
"genres": [
"australian garage punk",
"deep australian indie"
],
"href": "https://api.spotify.com/v1/artists/2cScEQkwCAObAfeFX4CYr4",
"id": "2cScEQkwCAObAfeFX4CYr4",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/3f0904b57afddaae790c8018b4e2f359e4ac0007",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/5758424d93fff82ab5a68c5340b916332c5e7666",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/5a0654ff901d48b1c73302e578a9208cd558a1f9",
"width": 160
}
],
"name": "Bootleg Rascal",
"popularity": 43,
"type": "artist",
"uri": "spotify:artist:2cScEQkwCAObAfeFX4CYr4"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/4sL6dLwItg7ppqj4NwEQr6"
},
"followers": {
"href": null,
"total": 27013
},
"genres": [
"australian hip hop",
"deep australian indie"
],
"href": "https://api.spotify.com/v1/artists/4sL6dLwItg7ppqj4NwEQr6",
"id": "4sL6dLwItg7ppqj4NwEQr6",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/acad0c783b2b386914f5e6774cf7fe1fdd0da90a",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/97f535f10a07e87aa91429d152da8a3b90770efd",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/649033515ea7c3e73603a25bf88d4c2cffbf60f0",
"width": 160
}
],
"name": "Horrorshow",
"popularity": 48,
"type": "artist",
"uri": "spotify:artist:4sL6dLwItg7ppqj4NwEQr6"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/6AdX4TgEt0fYWoRqvHi81A"
},
"followers": {
"href": null,
"total": 2091
},
"genres": [
"nz reggae"
],
"href": "https://api.spotify.com/v1/artists/6AdX4TgEt0fYWoRqvHi81A",
"id": "6AdX4TgEt0fYWoRqvHi81A",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/c78b03841ded6fb9440766908c2159ff41dd067e",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/e7755761df3703718818caba13417188603d91b7",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/60b847a5861d06ec04ebcf89f13acc5af4f619bf",
"width": 160
}
],
"name": "Tunes Of I",
"popularity": 26,
"type": "artist",
"uri": "spotify:artist:6AdX4TgEt0fYWoRqvHi81A"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/1fZpYWNWdL5Z3wrDtISFUH"
},
"followers": {
"href": null,
"total": 222796
},
"genres": [
"austindie",
"deep new americana",
"folk-pop",
"indie folk",
"indie pop",
"new americana",
"stomp and holler"
],
"href": "https://api.spotify.com/v1/artists/1fZpYWNWdL5Z3wrDtISFUH",
"id": "1fZpYWNWdL5Z3wrDtISFUH",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/e006e84f29c0d3ecbac3de829fdafac5c750ee03",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/e000991b7eca7e4d0da78143749f918725365d55",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/4c3c8295796b9d8cbe1302bba1468aef4f909172",
"width": 160
}
],
"name": "Shakey Graves",
"popularity": 62,
"type": "artist",
"uri": "spotify:artist:1fZpYWNWdL5Z3wrDtISFUH"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/2RnDmyX1zzOkK5Cj9QPhMq"
},
"followers": {
"href": null,
"total": 24169
},
"genres": [
"aussietronica",
"australian hip hop",
"deep australian indie"
],
"href": "https://api.spotify.com/v1/artists/2RnDmyX1zzOkK5Cj9QPhMq",
"id": "2RnDmyX1zzOkK5Cj9QPhMq",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/a781095e455c11e2c2ab6b16b3e3707e99992d42",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/1b069c54fbfce30558fa9a7d03b0275502f53949",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/715e3134b77459560b4b6b49c7aa6bf78ff39f43",
"width": 160
}
],
"name": "L D R U",
"popularity": 45,
"type": "artist",
"uri": "spotify:artist:2RnDmyX1zzOkK5Cj9QPhMq"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/2syYGtINPRno1nxxil7UcJ"
},
"followers": {
"href": null,
"total": 13498
},
"genres": [
"aussietronica",
"australian hip hop",
"deep australian indie"
],
"href": "https://api.spotify.com/v1/artists/2syYGtINPRno1nxxil7UcJ",
"id": "2syYGtINPRno1nxxil7UcJ",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/db4389fa712cc9fc4e3de10240a4dc186ac4a79d",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/594ef8f4fbd125e061f15fec52c54284fae860d8",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/fb7d386d3ff4694486d64f2a2f8fee4032871aee",
"width": 160
}
],
"name": "Kilter",
"popularity": 42,
"type": "artist",
"uri": "spotify:artist:2syYGtINPRno1nxxil7UcJ"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/3N9qpKjXarCt5AIZRCeqr8"
},
"followers": {
"href": null,
"total": 58023
},
"genres": [
"australian hip hop",
"deep australian indie"
],
"href": "https://api.spotify.com/v1/artists/3N9qpKjXarCt5AIZRCeqr8",
"id": "3N9qpKjXarCt5AIZRCeqr8",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/1ec33f6731a0a164d93e4e8b2591bf832a487b47",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/707b713d5e0cb3db28f1bfefe7e04fff7c8c9a38",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/1a8c54d968d297bbbd793f72091f875d4e8b01a9",
"width": 160
}
],
"name": "Seth Sentry",
"popularity": 48,
"type": "artist",
"uri": "spotify:artist:3N9qpKjXarCt5AIZRCeqr8"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/4C50EbCS11M0VbGyH3OfLt"
},
"followers": {
"href": null,
"total": 159915
},
"genres": [
"canadian indie",
"chamber pop",
"deep new americana",
"folk-pop",
"indie folk",
"indie pop",
"new americana",
"stomp and holler"
],
"href": "https://api.spotify.com/v1/artists/4C50EbCS11M0VbGyH3OfLt",
"id": "4C50EbCS11M0VbGyH3OfLt",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/cd311feeaa04b84a1437dc2cf0bcbc18d3405691",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/ba2a794f8e344849b3f065c4e48783f97e4a5666",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/a7ed799dbde96eea0c2957aa12ae81999c18fe5f",
"width": 160
}
],
"name": "Bahamas",
"popularity": 61,
"type": "artist",
"uri": "spotify:artist:4C50EbCS11M0VbGyH3OfLt"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/4IsiG6RpDyRq6Frd2CvddW"
},
"followers": {
"href": null,
"total": 2935
},
"genres": [],
"href": "https://api.spotify.com/v1/artists/4IsiG6RpDyRq6Frd2CvddW",
"id": "4IsiG6RpDyRq6Frd2CvddW",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/01ffce84750b2581eda44ef8fc317274b67b32c9",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/7432dc34784e4b6aeaf992fd6e9cfb6f0874a32a",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/14621750e581723e116534dee256ab497d497152",
"width": 160
}
],
"name": "Daily Bread",
"popularity": 32,
"type": "artist",
"uri": "spotify:artist:4IsiG6RpDyRq6Frd2CvddW"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/4Q6bcEc5YCypvMZ5kjaTMp"
},
"followers": {
"href": null,
"total": 52675
},
"genres": [
"australian hip hop",
"deep australian indie"
],
"href": "https://api.spotify.com/v1/artists/4Q6bcEc5YCypvMZ5kjaTMp",
"id": "4Q6bcEc5YCypvMZ5kjaTMp",
"images": [
{
"height": 639,
"url": "https://i.scdn.co/image/95f0ee438814c57055dfd8d3a53c02b24b55ac4b",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/93a304d0efd9fd0edf5061ab01be3b1d13a7bebf",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/f694bb6335a3fa471e9a1a5a3eaaf4cfa09b42f9",
"width": 160
}
],
"name": "Drapht",
"popularity": 50,
"type": "artist",
"uri": "spotify:artist:4Q6bcEc5YCypvMZ5kjaTMp"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/57MtJQ6Sc4tIxrXIhrqVJL"
},
"followers": {
"href": null,
"total": 80411
},
"genres": [
"alternative dance",
"chamber pop",
"chillwave",
"folk-pop",
"indie folk",
"indie pop",
"indie psych-rock",
"indie rock",
"indietronica",
"modern rock",
"neo-psychedelic",
"shimmer pop",
"stomp and holler"
],
"href": "https://api.spotify.com/v1/artists/57MtJQ6Sc4tIxrXIhrqVJL",
"id": "57MtJQ6Sc4tIxrXIhrqVJL",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/2e8f4c045d491ad1ece2ef4e910708a192c5974a",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/d3579803119d38740b9aa5e70fd11efa937652ff",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/dbe691a89b165235dafb046dc75429514c2509d8",
"width": 160
}
],
"name": "Generationals",
"popularity": 56,
"type": "artist",
"uri": "spotify:artist:57MtJQ6Sc4tIxrXIhrqVJL"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/6FIrstf3kHEg3zBOyLpvxD"
},
"followers": {
"href": null,
"total": 124420
},
"genres": [
"alternative dance",
"chamber pop",
"folk-pop",
"indie folk",
"indie pop",
"indie poptimism",
"indie psych-rock",
"indie rock",
"indietronica",
"modern rock",
"piano rock",
"shimmer pop",
"stomp and holler"
],
"href": "https://api.spotify.com/v1/artists/6FIrstf3kHEg3zBOyLpvxD",
"id": "6FIrstf3kHEg3zBOyLpvxD",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/a101d27e6d434f2412b6017d052422c6a5bb427d",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/6961a45fd0f086fe5426ff5238eccf0293ae9a1f",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/6ec824c5841b5627d2a617276f2aff9f6f229a12",
"width": 160
}
],
"name": "Ra Ra Riot",
"popularity": 55,
"type": "artist",
"uri": "spotify:artist:6FIrstf3kHEg3zBOyLpvxD"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/6dgwEwnK0YtDfS9XhRwBTG"
},
"followers": {
"href": null,
"total": 308448
},
"genres": [
"alternative dance",
"alternative rock",
"dance-punk",
"garage rock",
"indie folk",
"indie pop",
"indie rock",
"indietronica",
"la indie",
"modern rock",
"neo-psychedelic",
"new rave",
"shimmer pop",
"stomp and holler"
],
"href": "https://api.spotify.com/v1/artists/6dgwEwnK0YtDfS9XhRwBTG",
"id": "6dgwEwnK0YtDfS9XhRwBTG",
"images": [
{
"height": 667,
"url": "https://i.scdn.co/image/591a58117566440566151fdc35ce4690541f40a7",
"width": 1000
},
{
"height": 427,
"url": "https://i.scdn.co/image/0927c480776d103e2ad692fddde061603ba88009",
"width": 640
},
{
"height": 133,
"url": "https://i.scdn.co/image/b0d8ba4072a88efcff37489fb48f984c6fabad3b",
"width": 200
},
{
"height": 43,
"url": "https://i.scdn.co/image/3f7d1558836eabc904d35d2961316413da991462",
"width": 64
}
],
"name": "Broken Bells",
"popularity": 59,
"type": "artist",
"uri": "spotify:artist:6dgwEwnK0YtDfS9XhRwBTG"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/0SJxTOELZJa2Cf19TjNEfm"
},
"followers": {
"href": null,
"total": 3494
},
"genres": [],
"href": "https://api.spotify.com/v1/artists/0SJxTOELZJa2Cf19TjNEfm",
"id": "0SJxTOELZJa2Cf19TjNEfm",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/b2abbdde980e51acccd06166e95edb6d1dbfd341",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/09e545292b7a96346812b327418c144fec1ba6bf",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/ce032eff334d4881172dfd6c56593829c1afd134",
"width": 160
}
],
"name": "Shag Rock",
"popularity": 37,
"type": "artist",
"uri": "spotify:artist:0SJxTOELZJa2Cf19TjNEfm"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/1Xyo4u8uXC1ZmMpatF05PJ"
},
"followers": {
"href": null,
"total": 11571886
},
"genres": [
"canadian pop",
"pop",
"rap"
],
"href": "https://api.spotify.com/v1/artists/1Xyo4u8uXC1ZmMpatF05PJ",
"id": "1Xyo4u8uXC1ZmMpatF05PJ",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/a5fa0d35a5070867261d100b879cac028fe96775",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/df9086189e64ad3f3dec425f53b0c5f595a787b5",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/6f594793615650a9a6964bd523ef6977ccaaae85",
"width": 160
}
],
"name": "The Weeknd",
"popularity": 87,
"type": "artist",
"uri": "spotify:artist:1Xyo4u8uXC1ZmMpatF05PJ"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/68kEuyFKyqrdQQLLsmiatm"
},
"followers": {
"href": null,
"total": 630507
},
"genres": [
"conscious hip hop",
"escape room",
"hip hop",
"pop rap",
"rap",
"underground hip hop"
],
"href": "https://api.spotify.com/v1/artists/68kEuyFKyqrdQQLLsmiatm",
"id": "68kEuyFKyqrdQQLLsmiatm",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/6fe653e82f42b7878e0d113071e50edd2ca0cb5c",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/aa7a325a3f4c25facc06c723645b4b7627b9cb36",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/0399f29794737b102da54e773764c8016300ccac",
"width": 160
}
],
"name": "Vince Staples",
"popularity": 69,
"type": "artist",
"uri": "spotify:artist:68kEuyFKyqrdQQLLsmiatm"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/07EcmJpfAday8xGkslfanE"
},
"followers": {
"href": null,
"total": 161753
},
"genres": [
"indie r&b",
"rap"
],
"href": "https://api.spotify.com/v1/artists/07EcmJpfAday8xGkslfanE",
"id": "07EcmJpfAday8xGkslfanE",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/b509b83cfbb108eafcb79b7a93c84b0be0273e8f",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/666336211b56f044f062702cf1cb0075fb65c615",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/082d64dbf8fd41abe8ccb47824a4104ff2bd72b1",
"width": 160
}
],
"name": "Kevin Abstract",
"popularity": 58,
"type": "artist",
"uri": "spotify:artist:07EcmJpfAday8xGkslfanE"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/6Cy04iJLIYo0mQkNgJQoiV"
},
"followers": {
"href": null,
"total": 3373
},
"genres": [
"aussietronica",
"australian garage punk",
"deep australian indie"
],
"href": "https://api.spotify.com/v1/artists/6Cy04iJLIYo0mQkNgJQoiV",
"id": "6Cy04iJLIYo0mQkNgJQoiV",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/4eb1b4d8c853b08db660fb38ebe7b9988aa95760",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/da26969274d22b7b90ae5dc588bc905e0a81f9a1",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/5cee54444588a3df7e993bb3cb01bb6c2103c401",
"width": 160
}
],
"name": "Heaps Good Friends",
"popularity": 29,
"type": "artist",
"uri": "spotify:artist:6Cy04iJLIYo0mQkNgJQoiV"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/6MCHLEjYo9byp8QYGpgnGp"
},
"followers": {
"href": null,
"total": 4218
},
"genres": [
"aussietronica",
"australian hip hop",
"australian indigenous"
],
"href": "https://api.spotify.com/v1/artists/6MCHLEjYo9byp8QYGpgnGp",
"id": "6MCHLEjYo9byp8QYGpgnGp",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/dfb03f4cd9f682df2fa115b5511c2fb3223c2450",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/5ab2d3f22533875437e2b20f519d94d2a0ac502c",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/0be83a1039ec0095cc3d66c38c082f26e93f230b",
"width": 160
}
],
"name": "Kuren",
"popularity": 38,
"type": "artist",
"uri": "spotify:artist:6MCHLEjYo9byp8QYGpgnGp"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/360IAlyVv4PCEVjgyMZrxK"
},
"followers": {
"href": null,
"total": 1766748
},
"genres": [
"dance pop",
"indie r&b",
"pop",
"pop rap",
"r&b",
"rap"
],
"href": "https://api.spotify.com/v1/artists/360IAlyVv4PCEVjgyMZrxK",
"id": "360IAlyVv4PCEVjgyMZrxK",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/69d5702fb1057788fc79b4d0432cb245d3d2a871",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/1b5626d25f4efc8464aed7e56b3db27bee094dcd",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/28d1a09d6c7222a74c0a06367c2ed01a16624d71",
"width": 160
}
],
"name": "Miguel",
"popularity": 80,
"type": "artist",
"uri": "spotify:artist:360IAlyVv4PCEVjgyMZrxK"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/3H19dUT6SMuMawC1sLwCpx"
},
"followers": {
"href": null,
"total": 1977
},
"genres": [],
"href": "https://api.spotify.com/v1/artists/3H19dUT6SMuMawC1sLwCpx",
"id": "3H19dUT6SMuMawC1sLwCpx",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/00e72ebf8d5d583712726ca57cf9d5df0ce8fdac",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/1a792fdaa579c0a80d77a4d480886eec6195b4a3",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/fd221a61c412e46ba27e4988fd4ce622f9ffe2a5",
"width": 160
}
],
"name": "Letters to Lions",
"popularity": 26,
"type": "artist",
"uri": "spotify:artist:3H19dUT6SMuMawC1sLwCpx"
},
{
"external_urls": {
"spotify": "https://open.spotify.com/artist/5K4W6rqBFWDnAN6FQUkS6x"
},
"followers": {
"href": null,
"total": 8090846
},
"genres": [
"pop rap",
"rap"
],
"href": "https://api.spotify.com/v1/artists/5K4W6rqBFWDnAN6FQUkS6x",
"id": "5K4W6rqBFWDnAN6FQUkS6x",
"images": [
{
"height": 640,
"url": "https://i.scdn.co/image/a12d8543e28d71d9f1e7f5f363c1a6c73316f9e6",
"width": 640
},
{
"height": 320,
"url": "https://i.scdn.co/image/42119cbcb4d694e7f0fe4a6d684fbc63902a916d",
"width": 320
},
{
"height": 160,
"url": "https://i.scdn.co/image/e36258fefdac3bef70bbfa6eca6cb5ecf9f22cea",
"width": 160
}
],
"name": "Kanye West",
"popularity": 88,
"type": "artist",
"uri": "spotify:artist:5K4W6rqBFWDnAN6FQUkS6x"
}
],
"total": 43,
"limit": 50,
"offset": 0,
"href": "https://api.spotify.com/v1/me/top/artists?limit=50&offset=0&time_range=short_term",
"previous": null,
"next": null
}
</textarea>
<br><br>
Here's the list presented by Tinder:
<br><br>
<ol id="tinder-sorting"></ol>
Here's the list provided by Spotify:
<br><br>
<ol id="spotify-sorting"></ol>
<br>
textarea {
height: 5em;
width: 50vw;
}
const textarea = document.getElementsByTagName("textarea")[0];
const spotifySorting = document.getElementById("spotify-sorting");
const tinderSorting = document.getElementById("tinder-sorting");
function changed() {
const raw = textarea.value;
const data = JSON.parse(raw);
const artists = [];
spotifySorting.innerHTML = "";
tinderSorting.innerHTML = "";
data.items.forEach((item) => {
artists.push({
"name": item.name,
"popularity": item.popularity
});
const li = document.createElement('li');
li.innerText = `${item.name} (popularity = ${item.popularity})`;
spotifySorting.appendChild(li);
});
// sort by popularity
artists.sort(function(a, b) {
return (a.popularity < b.popularity) ? 1 : ((b.popularity < a.popularity) ? -1 : 0);
}).forEach(function(item, index) {
// only show 20
if (index < 20) {
const li = document.createElement('li');
li.innerText = `${item.name} (popularity = ${item.popularity})`;
tinderSorting.appendChild(li);
}
});
};
textarea.addEventListener("change", changed);
changed();
Also see: Tab Triggers