{"id":18569,"date":"2020-06-26T02:53:46","date_gmt":"2020-06-26T09:53:46","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=18569"},"modified":"2023-12-01T03:35:37","modified_gmt":"2023-12-01T11:35:37","slug":"ruby-for-loop","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/","title":{"rendered":"Ruby For Loop"},"content":{"rendered":"\n<p>As developers, our goal is to write succinct and effective code. Loops are one way to cut down on unnecessary code. In Ruby, there are several types of loops including `while`, `for`, `do..while`, and `until` loops. In this article, we\u2019ll discuss how to implement a `for` loop while writing code in Ruby.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is a Loop?<\/h2>\n\n\n\n<p>A loop is an instruction to repeat an action until a condition is met. Let\u2019s look at a real-life analogy:&nbsp;<br><\/p>\n\n\n\n<p>At a New Year\u2019s Eve party, guests count down to midnight and shout, \u201cHappy New Year!\u201d In this situation, the guests are repeating an action (counting out loud) until a condition is met (the clock strikes midnight.) The guests don\u2019t continue counting down past, \u201cOne!\u201d and start shouting negative numbers, because the condition has been met.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">For Loops<\/h2>\n\n\n\n<p>There are different loops that work better in different situations, and loops vary between programming languages. In Ruby, the `for` loop works best when the number of times the action will be completed is definite.<br><\/p>\n\n\n\n<p>The New Year\u2019s Eve analogy continues to work here: the guests will shout from the number ten to the number one, before shouting, \u201cHappy New Year.\u201d The number of times the action will repeat is limited. Whereas in `while` loops, the action will continue as long as the conditional is true, and will stop when the conditional is false (or continue as an infinite loop.) You can read more about the <a href=\"https:\/\/careerkarma.com\/blog\/ruby-while-loop\/\"><strong>Ruby While Loop<\/strong><\/a>\u201d here.<br><\/p>\n\n\n\n<p>The syntax of a `for` loop is:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>for element in collection\n#execute code\nend<\/pre><\/div>\n\n\n\n<p>If we take a look at the code, it says: for each element in this collection, apply this change to each element of the code. When using a `for` loop, the keywords you need to include are <strong>for <\/strong>and <strong>in; <\/strong>the rest is interchangeable based on what your code accomplishes.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Similarity to the Each Method<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1020\" height=\"680\" src=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/marjanblan-jhARm0AqF_E-unsplash.jpg\" alt=\"A street art painting of Marvel\u2019s Iron Man.\" class=\"wp-image-18570\" srcset=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/marjanblan-jhARm0AqF_E-unsplash.jpg 1020w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/marjanblan-jhARm0AqF_E-unsplash-768x512.jpg 768w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/marjanblan-jhARm0AqF_E-unsplash-770x513.jpg 770w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/marjanblan-jhARm0AqF_E-unsplash-20x13.jpg 20w, https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/marjanblan-jhARm0AqF_E-unsplash-385x257.jpg 385w\" sizes=\"auto, (max-width: 1020px) 100vw, 1020px\" \/><figcaption class=\"wp-element-caption\"> Now let\u2019s iterate through an array of Avengers. <\/figcaption><\/figure>\n\n\n\n<p>Here\u2019s a second example of using a `for` loop with an array.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>avengers = [\"Iron Man\", \"Captain America\", \"Hulk\", \"Thor\", \"Black Widow\", \"Hawkeye\"]\n  for member in avengers\n    puts \"Good morning, I'm #{member}.\"\n  end<\/pre><\/div>\n\n\n\n<p>This code uses a `for` loop to iterate through each member in the avengers array and output a string with a greeting and the member information\u2014in this case, their name.<br><\/p>\n\n\n\n<p>The output of the code is:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Good morning, I'm Iron Man.\nGood morning, I'm Captain America.\nGood morning, I'm Hulk.\nGood morning, I'm Thor.\nGood morning, I'm Black Widow.\nGood morning, I'm Hawkeye.<\/pre><\/div>\n\n\n\n<p>You might notice using a `for` loop with Ruby is similar to using the .each method. Here is a similar code using the .each method with a similar output.<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>avengers = [\"Iron Man\", \"Captain America\", \"Hulk\", \"Thor\", \"Black Widow\", \"Hawkeye\"]\n  avengers.each do |member|\n    puts \"Good afternoon, I'm #{member}.\"\n  end<\/pre><\/div>\n\n\n\n<p>The output of the code is:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Good afternoon, I'm Iron Man.\nGood afternoon, I'm Captain America.\nGood afternoon, I'm Hulk.\nGood afternoon, I'm Thor.\nGood afternoon, I'm Black Widow.\nGood afternoon, I'm Hawkeye.<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>In this article, we learned about `for` loops in Ruby, which are the preferred loop when the number of times the action will repeat is set at the beginning of the loop. We also learned how the `for` loop is similar to the .each method.&nbsp;<\/p>\n\n\n\n<p>If you are curious about what you can do using Ruby, check out our article, \u201d<a href=\"https:\/\/careerkarma.com\/blog\/what-is-ruby-used-for\/\"><strong>What Is Ruby Code Used For?<\/strong><\/a>\u201d<\/p>\n","protected":false},"excerpt":{"rendered":"As developers, our goal is to write succinct and effective code. Loops are one way to cut down on unnecessary code. In Ruby, there are several types of loops including `while`, `for`, `do..while`, and `until` loops. In this article, we\u2019ll discuss how to implement a `for` loop while writing code in Ruby. What is a&hellip;","protected":false},"author":240,"featured_media":18074,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[17278],"tags":[],"class_list":{"0":"post-18569","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-ruby"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"Ruby","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":"","is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.0 (Yoast SEO v27.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Ruby For Loop: A Complete Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"Loops are one way to cut down on unnecessary code. Lear more about for loops in Ruby with Career Karma.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ruby For Loop\" \/>\n<meta property=\"og:description\" content=\"Loops are one way to cut down on unnecessary code. Lear more about for loops in Ruby with Career Karma.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-26T09:53:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T11:35:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/fabian-grohs-XMFZqrGyV-Q-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"993\" \/>\n\t<meta property=\"og:image:height\" content=\"768\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"James Gallagher\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James Gallagher\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Ruby For Loop\",\"datePublished\":\"2020-06-26T09:53:46+00:00\",\"dateModified\":\"2023-12-01T11:35:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/\"},\"wordCount\":478,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/fabian-grohs-XMFZqrGyV-Q-unsplash.jpg\",\"articleSection\":[\"Ruby\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/\",\"name\":\"Ruby For Loop: A Complete Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/fabian-grohs-XMFZqrGyV-Q-unsplash.jpg\",\"datePublished\":\"2020-06-26T09:53:46+00:00\",\"dateModified\":\"2023-12-01T11:35:37+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"Loops are one way to cut down on unnecessary code. Lear more about for loops in Ruby with Career Karma.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/fabian-grohs-XMFZqrGyV-Q-unsplash.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/fabian-grohs-XMFZqrGyV-Q-unsplash.jpg\",\"width\":993,\"height\":768,\"caption\":\"Silver MacBook with code on the screen, an open notebook beside it.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/careerkarma.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ruby\",\"item\":\"https:\/\/careerkarma.com\/blog\/ruby\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Ruby For Loop\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\",\"url\":\"https:\/\/careerkarma.com\/blog\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/careerkarma.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\",\"name\":\"James Gallagher\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"caption\":\"James Gallagher\"},\"description\":\"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.\",\"url\":\"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Ruby For Loop: A Complete Guide | Career Karma","description":"Loops are one way to cut down on unnecessary code. Lear more about for loops in Ruby with Career Karma.","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:\/\/careerkarma.com\/blog\/ruby-for-loop\/","og_locale":"en_US","og_type":"article","og_title":"Ruby For Loop","og_description":"Loops are one way to cut down on unnecessary code. Lear more about for loops in Ruby with Career Karma.","og_url":"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-06-26T09:53:46+00:00","article_modified_time":"2023-12-01T11:35:37+00:00","og_image":[{"width":993,"height":768,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/fabian-grohs-XMFZqrGyV-Q-unsplash.jpg","type":"image\/jpeg"}],"author":"James Gallagher","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"James Gallagher","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Ruby For Loop","datePublished":"2020-06-26T09:53:46+00:00","dateModified":"2023-12-01T11:35:37+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/"},"wordCount":478,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/fabian-grohs-XMFZqrGyV-Q-unsplash.jpg","articleSection":["Ruby"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/ruby-for-loop\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/","url":"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/","name":"Ruby For Loop: A Complete Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/fabian-grohs-XMFZqrGyV-Q-unsplash.jpg","datePublished":"2020-06-26T09:53:46+00:00","dateModified":"2023-12-01T11:35:37+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"Loops are one way to cut down on unnecessary code. Lear more about for loops in Ruby with Career Karma.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/ruby-for-loop\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/fabian-grohs-XMFZqrGyV-Q-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/fabian-grohs-XMFZqrGyV-Q-unsplash.jpg","width":993,"height":768,"caption":"Silver MacBook with code on the screen, an open notebook beside it."},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/ruby-for-loop\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Ruby","item":"https:\/\/careerkarma.com\/blog\/ruby\/"},{"@type":"ListItem","position":3,"name":"Ruby For Loop"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94","name":"James Gallagher","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","caption":"James Gallagher"},"description":"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.","url":"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/18569","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/240"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=18569"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/18569\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/18074"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=18569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=18569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=18569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}