{"id":994,"date":"2023-03-14T12:31:23","date_gmt":"2023-03-14T12:31:23","guid":{"rendered":"https:\/\/thoth.dk\/?p=994"},"modified":"2025-12-10T21:11:53","modified_gmt":"2025-12-10T21:11:53","slug":"json-array-in-wp","status":"publish","type":"post","link":"https:\/\/thoth.dk\/index.php\/2023\/03\/14\/json-array-in-wp\/","title":{"rendered":"JSON Array in WP"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This page is a demonstration of <a href=\"https:\/\/thoth.dk\/index.php\/json-band-list\/\" data-type=\"post\" data-id=\"994\">the turotial &#8220;JSON Band List&#8221;<\/a>. Here the contents of the JSON band list is looped out in my post.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<div id=\"result\"><\/div>\n\n<script>\n \n let bands = {\n  \"List\": [\n    {\n      \"Band\": \"The Kinks\",\n      \"Stage\": \"Blue\",\n      \"Image\": \"https:\/\/thoth.dk\/wp-content\/uploads\/2023\/03\/image-4.png\"\n    },\n    {\n      \"Band\": \"Velvet Underground\",\n      \"Stage\": \"Orange\",\n      \"Image\": \"https:\/\/thoth.dk\/wp-content\/uploads\/2023\/03\/punk.jpeg\"\n    },\n    {\n      \"Band\": \"Aura\",\n      \"Stage\": \"Green\",\n      \"Image\": \"https:\/\/thoth.dk\/wp-content\/uploads\/2023\/03\/image-3.png\"\n    },\n    {\n      \"Band\": \"Ozzy Osborne\",\n      \"Stage\": \"Black\",\n      \"Image\": \"https:\/\/thoth.dk\/wp-content\/uploads\/2023\/03\/manga-band.jpeg\"\n    },\n    {\n      \"Band\": \"Mozart Rock Experience\",\n      \"Stage\": \"Pink\",\n      \"Image\": \"https:\/\/thoth.dk\/wp-content\/uploads\/2023\/03\/manga-band.jpeg\"\n    },\n    {\n      \"Band\": \"Sigurds Ulvetime\",\n      \"Stage\": \"Blue\",\n      \"Image\": \"https:\/\/thoth.dk\/wp-content\/uploads\/2023\/03\/manga-band.jpeg\"\n    },\n    {\n      \"Band\": \"Pink Floyd\",\n      \"Stage\": \"Orange\",\n      \"Image\": \"https:\/\/thoth.dk\/wp-content\/uploads\/2023\/03\/manga-band.jpeg\"\n    }\n  ]\n}\n\nfor ( let i = 0; i<bands.List.length; i++ ){\n    result.innerHTML += \"<div>\" \n    result.innerHTML +=  \"<img src='\" + bands.List[i].Image + \"'class='respImg' alt='Band image'>\" \n    result.innerHTML += bands.List[i].Band + \"<br>\" \n    result.innerHTML += \"<\/div>\" \n\n}\n\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>This page is a demonstration of the turotial &#8220;JSON Band List&#8221;. Here the contents of the JSON band list is looped out in my post.<\/p>\n","protected":false},"author":1,"featured_media":941,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[20],"tags":[89,88,49],"class_list":["post-994","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-eng","tag-array","tag-json","tag-tilpasset-kode"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JSON Array in WP - Wordpress og WooCommerce<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/thoth.dk\/index.php\/2023\/03\/14\/json-array-in-wp\/\" \/>\n<meta property=\"og:locale\" content=\"da_DK\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JSON Array in WP - Wordpress og WooCommerce\" \/>\n<meta property=\"og:description\" content=\"This page is a demonstration of the turotial &#8220;JSON Band List&#8221;. Here the contents of the JSON band list is looped out in my post.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/thoth.dk\/index.php\/2023\/03\/14\/json-array-in-wp\/\" \/>\n<meta property=\"og:site_name\" content=\"Wordpress og WooCommerce\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-14T12:31:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-10T21:11:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/thoth.dk\/wp-content\/uploads\/2023\/03\/manga-band.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"512\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Per Thykj\u00e6r Jensen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Skrevet af\" \/>\n\t<meta name=\"twitter:data1\" content=\"Per Thykj\u00e6r Jensen\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/thoth.dk\\\/index.php\\\/2023\\\/03\\\/14\\\/json-array-in-wp\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thoth.dk\\\/index.php\\\/2023\\\/03\\\/14\\\/json-array-in-wp\\\/\"},\"author\":{\"name\":\"Per Thykj\u00e6r Jensen\",\"@id\":\"https:\\\/\\\/thoth.dk\\\/#\\\/schema\\\/person\\\/d94ae14e2a45089632b96d9f633fac06\"},\"headline\":\"JSON Array in WP\",\"datePublished\":\"2023-03-14T12:31:23+00:00\",\"dateModified\":\"2025-12-10T21:11:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/thoth.dk\\\/index.php\\\/2023\\\/03\\\/14\\\/json-array-in-wp\\\/\"},\"wordCount\":29,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/thoth.dk\\\/index.php\\\/2023\\\/03\\\/14\\\/json-array-in-wp\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thoth.dk\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/manga-band.jpeg\",\"keywords\":[\"array\",\"JSON\",\"Tilpasset kode\"],\"articleSection\":[\"\ud83c\uddec\ud83c\udde7 English Tutorials\"],\"inLanguage\":\"da-DK\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/thoth.dk\\\/index.php\\\/2023\\\/03\\\/14\\\/json-array-in-wp\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/thoth.dk\\\/index.php\\\/2023\\\/03\\\/14\\\/json-array-in-wp\\\/\",\"url\":\"https:\\\/\\\/thoth.dk\\\/index.php\\\/2023\\\/03\\\/14\\\/json-array-in-wp\\\/\",\"name\":\"JSON Array in WP - Wordpress og WooCommerce\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thoth.dk\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/thoth.dk\\\/index.php\\\/2023\\\/03\\\/14\\\/json-array-in-wp\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/thoth.dk\\\/index.php\\\/2023\\\/03\\\/14\\\/json-array-in-wp\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thoth.dk\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/manga-band.jpeg\",\"datePublished\":\"2023-03-14T12:31:23+00:00\",\"dateModified\":\"2025-12-10T21:11:53+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/thoth.dk\\\/#\\\/schema\\\/person\\\/d94ae14e2a45089632b96d9f633fac06\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/thoth.dk\\\/index.php\\\/2023\\\/03\\\/14\\\/json-array-in-wp\\\/#breadcrumb\"},\"inLanguage\":\"da-DK\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/thoth.dk\\\/index.php\\\/2023\\\/03\\\/14\\\/json-array-in-wp\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"da-DK\",\"@id\":\"https:\\\/\\\/thoth.dk\\\/index.php\\\/2023\\\/03\\\/14\\\/json-array-in-wp\\\/#primaryimage\",\"url\":\"https:\\\/\\\/thoth.dk\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/manga-band.jpeg\",\"contentUrl\":\"https:\\\/\\\/thoth.dk\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/manga-band.jpeg\",\"width\":512,\"height\":512},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/thoth.dk\\\/index.php\\\/2023\\\/03\\\/14\\\/json-array-in-wp\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/thoth.dk\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JSON Array in WP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/thoth.dk\\\/#website\",\"url\":\"https:\\\/\\\/thoth.dk\\\/\",\"name\":\"Wordpress og WooCommerce\",\"description\":\"Syv kreative dage med WordPress og WooCommerce\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/thoth.dk\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"da-DK\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/thoth.dk\\\/#\\\/schema\\\/person\\\/d94ae14e2a45089632b96d9f633fac06\",\"name\":\"Per Thykj\u00e6r Jensen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"da-DK\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0c742a8215d5628ce5ef34c45460dd1c5211c693c0613635306baeec5c28d7a9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0c742a8215d5628ce5ef34c45460dd1c5211c693c0613635306baeec5c28d7a9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0c742a8215d5628ce5ef34c45460dd1c5211c693c0613635306baeec5c28d7a9?s=96&d=mm&r=g\",\"caption\":\"Per Thykj\u00e6r Jensen\"},\"description\":\"P\u00e5 Thoth.dk kan du finde tutorials og artikler om udvikling af websites med WordPress og online shopping med WooCommerce. Der er fokus p\u00e5 de nyeste blokbaserede temaer og metoder. Materialer og tutorials er udviklet af Per Thykj\u00e6r Jensen, lektor p\u00e5 Multimediedesigneruddannelsen ved Erhvervsakademi Aarhus.\",\"sameAs\":[\"https:\\\/\\\/thoth.dk\"],\"url\":\"https:\\\/\\\/thoth.dk\\\/index.php\\\/author\\\/per\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JSON Array in WP - Wordpress og WooCommerce","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/thoth.dk\/index.php\/2023\/03\/14\/json-array-in-wp\/","og_locale":"da_DK","og_type":"article","og_title":"JSON Array in WP - Wordpress og WooCommerce","og_description":"This page is a demonstration of the turotial &#8220;JSON Band List&#8221;. Here the contents of the JSON band list is looped out in my post.","og_url":"https:\/\/thoth.dk\/index.php\/2023\/03\/14\/json-array-in-wp\/","og_site_name":"Wordpress og WooCommerce","article_published_time":"2023-03-14T12:31:23+00:00","article_modified_time":"2025-12-10T21:11:53+00:00","og_image":[{"width":512,"height":512,"url":"https:\/\/thoth.dk\/wp-content\/uploads\/2023\/03\/manga-band.jpeg","type":"image\/jpeg"}],"author":"Per Thykj\u00e6r Jensen","twitter_card":"summary_large_image","twitter_misc":{"Skrevet af":"Per Thykj\u00e6r Jensen"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/thoth.dk\/index.php\/2023\/03\/14\/json-array-in-wp\/#article","isPartOf":{"@id":"https:\/\/thoth.dk\/index.php\/2023\/03\/14\/json-array-in-wp\/"},"author":{"name":"Per Thykj\u00e6r Jensen","@id":"https:\/\/thoth.dk\/#\/schema\/person\/d94ae14e2a45089632b96d9f633fac06"},"headline":"JSON Array in WP","datePublished":"2023-03-14T12:31:23+00:00","dateModified":"2025-12-10T21:11:53+00:00","mainEntityOfPage":{"@id":"https:\/\/thoth.dk\/index.php\/2023\/03\/14\/json-array-in-wp\/"},"wordCount":29,"commentCount":0,"image":{"@id":"https:\/\/thoth.dk\/index.php\/2023\/03\/14\/json-array-in-wp\/#primaryimage"},"thumbnailUrl":"https:\/\/thoth.dk\/wp-content\/uploads\/2023\/03\/manga-band.jpeg","keywords":["array","JSON","Tilpasset kode"],"articleSection":["\ud83c\uddec\ud83c\udde7 English Tutorials"],"inLanguage":"da-DK","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/thoth.dk\/index.php\/2023\/03\/14\/json-array-in-wp\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/thoth.dk\/index.php\/2023\/03\/14\/json-array-in-wp\/","url":"https:\/\/thoth.dk\/index.php\/2023\/03\/14\/json-array-in-wp\/","name":"JSON Array in WP - Wordpress og WooCommerce","isPartOf":{"@id":"https:\/\/thoth.dk\/#website"},"primaryImageOfPage":{"@id":"https:\/\/thoth.dk\/index.php\/2023\/03\/14\/json-array-in-wp\/#primaryimage"},"image":{"@id":"https:\/\/thoth.dk\/index.php\/2023\/03\/14\/json-array-in-wp\/#primaryimage"},"thumbnailUrl":"https:\/\/thoth.dk\/wp-content\/uploads\/2023\/03\/manga-band.jpeg","datePublished":"2023-03-14T12:31:23+00:00","dateModified":"2025-12-10T21:11:53+00:00","author":{"@id":"https:\/\/thoth.dk\/#\/schema\/person\/d94ae14e2a45089632b96d9f633fac06"},"breadcrumb":{"@id":"https:\/\/thoth.dk\/index.php\/2023\/03\/14\/json-array-in-wp\/#breadcrumb"},"inLanguage":"da-DK","potentialAction":[{"@type":"ReadAction","target":["https:\/\/thoth.dk\/index.php\/2023\/03\/14\/json-array-in-wp\/"]}]},{"@type":"ImageObject","inLanguage":"da-DK","@id":"https:\/\/thoth.dk\/index.php\/2023\/03\/14\/json-array-in-wp\/#primaryimage","url":"https:\/\/thoth.dk\/wp-content\/uploads\/2023\/03\/manga-band.jpeg","contentUrl":"https:\/\/thoth.dk\/wp-content\/uploads\/2023\/03\/manga-band.jpeg","width":512,"height":512},{"@type":"BreadcrumbList","@id":"https:\/\/thoth.dk\/index.php\/2023\/03\/14\/json-array-in-wp\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/thoth.dk\/"},{"@type":"ListItem","position":2,"name":"JSON Array in WP"}]},{"@type":"WebSite","@id":"https:\/\/thoth.dk\/#website","url":"https:\/\/thoth.dk\/","name":"Wordpress og WooCommerce","description":"Syv kreative dage med WordPress og WooCommerce","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/thoth.dk\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"da-DK"},{"@type":"Person","@id":"https:\/\/thoth.dk\/#\/schema\/person\/d94ae14e2a45089632b96d9f633fac06","name":"Per Thykj\u00e6r Jensen","image":{"@type":"ImageObject","inLanguage":"da-DK","@id":"https:\/\/secure.gravatar.com\/avatar\/0c742a8215d5628ce5ef34c45460dd1c5211c693c0613635306baeec5c28d7a9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0c742a8215d5628ce5ef34c45460dd1c5211c693c0613635306baeec5c28d7a9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0c742a8215d5628ce5ef34c45460dd1c5211c693c0613635306baeec5c28d7a9?s=96&d=mm&r=g","caption":"Per Thykj\u00e6r Jensen"},"description":"P\u00e5 Thoth.dk kan du finde tutorials og artikler om udvikling af websites med WordPress og online shopping med WooCommerce. Der er fokus p\u00e5 de nyeste blokbaserede temaer og metoder. Materialer og tutorials er udviklet af Per Thykj\u00e6r Jensen, lektor p\u00e5 Multimediedesigneruddannelsen ved Erhvervsakademi Aarhus.","sameAs":["https:\/\/thoth.dk"],"url":"https:\/\/thoth.dk\/index.php\/author\/per\/"}]}},"_links":{"self":[{"href":"https:\/\/thoth.dk\/index.php\/wp-json\/wp\/v2\/posts\/994","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thoth.dk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thoth.dk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thoth.dk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thoth.dk\/index.php\/wp-json\/wp\/v2\/comments?post=994"}],"version-history":[{"count":11,"href":"https:\/\/thoth.dk\/index.php\/wp-json\/wp\/v2\/posts\/994\/revisions"}],"predecessor-version":[{"id":1016,"href":"https:\/\/thoth.dk\/index.php\/wp-json\/wp\/v2\/posts\/994\/revisions\/1016"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thoth.dk\/index.php\/wp-json\/wp\/v2\/media\/941"}],"wp:attachment":[{"href":"https:\/\/thoth.dk\/index.php\/wp-json\/wp\/v2\/media?parent=994"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thoth.dk\/index.php\/wp-json\/wp\/v2\/categories?post=994"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thoth.dk\/index.php\/wp-json\/wp\/v2\/tags?post=994"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}