{"id":3860,"date":"2022-08-20T20:42:34","date_gmt":"2022-08-20T15:12:34","guid":{"rendered":"https:\/\/jassweb.com\/solved\/solved-how-to-access-the-correct-this-inside-a-callback\/"},"modified":"2022-08-20T20:42:34","modified_gmt":"2022-08-20T15:12:34","slug":"solved-how-to-access-the-correct-this-inside-a-callback","status":"publish","type":"post","link":"https:\/\/jassweb.com\/solved\/solved-how-to-access-the-correct-this-inside-a-callback\/","title":{"rendered":"(Solved) How to access the correct `this` inside a callback"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div id=\"answer-20279485\" class=\"answer js-answer accepted-answer js-accepted-answer\" data-answerid=\"20279485\" data-parentid=\"20279484\" data-score=\"2186\" data-position-on-page=\"1\" data-highest-scored=\"1\" data-question-has-accepted-highest-score=\"1\" itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n<div class=\"post-layout\">\n<div class=\"votecell post-layout--left\"><\/div>\n<div class=\"answercell post-layout--right\">\n<div class=\"s-prose js-post-body\" itemprop=\"text\">\n<h2>What you should know about <code>this<\/code><\/h2>\n<p><code>this<\/code> (aka &#8220;the context&#8221;) is a special keyword inside each function and its value only depends on <em>how<\/em> the function was called, not how\/when\/where it was defined. It is not affected by lexical scopes like other variables (except for arrow functions, see below). Here are some examples:<\/p>\n<pre><code>function foo() {\n    console.log(this);\n}\n\n\/\/ normal function call\nfoo(); \/\/ `this` will refer to `window`\n\n\/\/ as object method\nvar obj = {bar: foo};\nobj.bar(); \/\/ `this` will refer to `obj`\n\n\/\/ as constructor function\nnew foo(); \/\/ `this` will refer to an object that inherits from `foo.prototype`\n<\/code><\/pre>\n<p>To learn more about <code>this<\/code>, have a look at the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Operators\/this\">MDN documentation<\/a>.<\/p>\n<hr>\n<h2>How to refer to the correct <code>this<\/code><\/h2>\n<h3>Use <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Functions\/Arrow_functions\">arrow functions<\/a><\/h3>\n<p>ECMAScript 6 introduced <em>arrow functions<\/em>, which can be thought of as lambda functions. They don&#8217;t have their own <code>this<\/code> binding. Instead, <code>this<\/code> is looked up in scope just like a normal variable. That means you don&#8217;t have to call <code>.bind<\/code>. That&#8217;s not the only special behavior they have, please refer to the MDN documentation for more information.<\/p>\n<pre><code>function MyConstructor(data, transport) {\n    this.data = data;\n    transport.on('data', () =&gt; alert(this.data));\n}\n<\/code><\/pre>\n<h3>Don&#8217;t use <code>this<\/code><\/h3>\n<p>You actually don&#8217;t want to access <code>this<\/code> in particular, but <em>the object it refers to<\/em>. That&#8217;s why an easy solution is to simply create a new variable that also refers to that object. The variable can have any name, but common ones are <code>self<\/code> and <code>that<\/code>.<\/p>\n<pre><code>function MyConstructor(data, transport) {\n    this.data = data;\n    var self = this;\n    transport.on('data', function() {\n        alert(self.data);\n    });\n}\n<\/code><\/pre>\n<p>Since <code>self<\/code> is a normal variable, it obeys lexical scope rules and is accessible inside the callback. This also has the advantage that you can access the <code>this<\/code> value of the callback itself.<\/p>\n<h3>Explicitly set <code>this<\/code> of the callback &#8211; part 1<\/h3>\n<p>It might look like you have no control over the value of <code>this<\/code> because its value is set automatically, but that is actually not the case.<\/p>\n<p>Every function has the method <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Function\/bind\"><code>.bind<\/code> <em><sup>[docs]<\/sup><\/em><\/a>, which returns a new function with <code>this<\/code> bound to a value. The function has exactly the same behavior as the one you called <code>.bind<\/code> on, only that <code>this<\/code> was set by you. No matter how or when that function is called, <code>this<\/code> will always refer to the passed value.<\/p>\n<pre><code>function MyConstructor(data, transport) {\n    this.data = data;\n    var boundFunction = (function() { \/\/ parenthesis are not necessary\n        alert(this.data);             \/\/ but might improve readability\n    }).bind(this); \/\/ &lt;- here we are calling `.bind()` \n    transport.on('data', boundFunction);\n}\n<\/code><\/pre>\n<p>In this case, we are binding the callback&#8217;s <code>this<\/code> to the value of <code>MyConstructor<\/code>&#8216;s <code>this<\/code>.<\/p>\n<p><strong>Note:<\/strong> When a binding context for jQuery, use <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/api.jquery.com\/jQuery.proxy\/\"><code>jQuery.proxy<\/code> <em><sup>[docs]<\/sup><\/em><\/a> instead. The reason to do this is so that you don&#8217;t need to store the reference to the function when unbinding an event callback. jQuery handles that internally.<\/p>\n<h3>Set <code>this<\/code> of the callback &#8211; part 2<\/h3>\n<p>Some functions\/methods which accept callbacks also accept a value to which the callback&#8217;s <code>this<\/code> should refer to. This is basically the same as binding it yourself, but the function\/method does it for you. <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Array\/map\"><code>Array#map<\/code> <em><sup>[docs]<\/sup><\/em><\/a> is such a method. Its signature is:<\/p>\n<pre><code>array.map(callback[, thisArg])\n<\/code><\/pre>\n<p>The first argument is the callback and the second argument is the value <code>this<\/code> should refer to. Here is a contrived example:<\/p>\n<pre><code>var arr = [1, 2, 3];\nvar obj = {multiplier: 42};\n\nvar new_arr = arr.map(function(v) {\n    return v * this.multiplier;\n}, obj); \/\/ &lt;- here we are passing `obj` as second argument\n<\/code><\/pre>\n<p><strong>Note:<\/strong> Whether or not you can pass a value for <code>this<\/code> is usually mentioned in the documentation of that function\/method. For example, <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/api.jquery.com\/jQuery.ajax\/\">jQuery&#8217;s <code>$.ajax<\/code> method <em><sup>[docs]<\/sup><\/em><\/a> describes an option called <code>context<\/code>:<\/p>\n<blockquote>\n<p>This object will be made the context of all Ajax-related callbacks.<\/p>\n<\/blockquote>\n<hr>\n<h2>Common problem: Using object methods as callbacks\/event handlers<\/h2>\n<p>Another common manifestation of this problem is when an object method is used as callback\/event handler. Functions are first-class citizens in JavaScript and the term &#8220;method&#8221; is just a colloquial term for a function that is a value of an object property. But that function doesn&#8217;t have a specific link to its &#8220;containing&#8221; object.<\/p>\n<p>Consider the following example:<\/p>\n<pre><code>function Foo() {\n    this.data = 42,\n    document.body.onclick = this.method;\n}\n\nFoo.prototype.method = function() {\n    console.log(this.data);\n};\n<\/code><\/pre>\n<p>The function <code>this.method<\/code> is assigned as click event handler, but if the <code>document.body<\/code> is clicked, the value logged will be <code>undefined<\/code>, because inside the event handler, <code>this<\/code> refers to the <code>document.body<\/code>, not the instance of <code>Foo<\/code>.<br \/>\nAs already mentioned at the beginning, what <code>this<\/code> refers to depends on how the function is <strong>called<\/strong>, not how it is <strong>defined<\/strong>.<br \/>\nIf the code was like the following, it might be more obvious that the function doesn&#8217;t have an implicit reference to the object:<\/p>\n<pre><code>function method() {\n    console.log(this.data);\n}\n\n\nfunction Foo() {\n    this.data = 42,\n    document.body.onclick = this.method;\n}\n\nFoo.prototype.method = method;\n<\/code><\/pre>\n<p><strong>The solution<\/strong> is the same as mentioned above: If available, use <code>.bind<\/code> to explicitly bind <code>this<\/code> to a specific value<\/p>\n<pre><code>document.body.onclick = this.method.bind(this);\n<\/code><\/pre>\n<p>or explicitly call the function as a &#8220;method&#8221; of the object, by using an anonymous function as callback \/ event handler and assign the object (<code>this<\/code>) to another variable:<\/p>\n<pre><code>var self = this;\ndocument.body.onclick = function() {\n    self.method();\n};\n<\/code><\/pre>\n<p>or use an arrow function:<\/p>\n<pre><code>document.body.onclick = () =&gt; this.method();\n<\/code><\/pre>\n<\/p><\/div>\n<div class=\"mt24\"><\/div>\n<\/div>\n<p>            <span class=\"d-none\" itemprop=\"commentCount\">4<\/span> <\/p><\/div>\n<\/div>\n<p>[ad_2]<\/p>\n<p>solved How to access the correct `this` inside a callback <\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] What you should know about this this (aka &#8220;the context&#8221;) is a special keyword inside each function and its value only depends on how the function was called, not how\/when\/where it was defined. It is not affected by lexical scopes like other variables (except for arrow functions, see below). Here are some examples: function &#8230; <a title=\"(Solved) How to access the correct `this` inside a callback\" class=\"read-more\" href=\"https:\/\/jassweb.com\/solved\/solved-how-to-access-the-correct-this-inside-a-callback\/\" aria-label=\"More on (Solved) How to access the correct `this` inside a callback\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[320],"tags":[396,333,397],"class_list":["post-3860","post","type-post","status-publish","format-standard","hentry","category-solved","tag-callback","tag-javascript","tag-this"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>(Solved) How to access the correct `this` inside a callback - JassWeb<\/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:\/\/jassweb.com\/solved\/solved-how-to-access-the-correct-this-inside-a-callback\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"(Solved) How to access the correct `this` inside a callback - JassWeb\" \/>\n<meta property=\"og:description\" content=\"[ad_1] What you should know about this this (aka &#8220;the context&#8221;) is a special keyword inside each function and its value only depends on how the function was called, not how\/when\/where it was defined. It is not affected by lexical scopes like other variables (except for arrow functions, see below). Here are some examples: function ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jassweb.com\/solved\/solved-how-to-access-the-correct-this-inside-a-callback\/\" \/>\n<meta property=\"og:site_name\" content=\"JassWeb\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-20T15:12:34+00:00\" \/>\n<meta name=\"author\" content=\"Kirat\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kirat\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-access-the-correct-this-inside-a-callback\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-access-the-correct-this-inside-a-callback\/\"},\"author\":{\"name\":\"Kirat\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\"},\"headline\":\"(Solved) How to access the correct `this` inside a callback\",\"datePublished\":\"2022-08-20T15:12:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-access-the-correct-this-inside-a-callback\/\"},\"wordCount\":670,\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"keywords\":[\"callback\",\"javascript\",\"this\"],\"articleSection\":[\"Solved\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-access-the-correct-this-inside-a-callback\/\",\"url\":\"https:\/\/jassweb.com\/solved\/solved-how-to-access-the-correct-this-inside-a-callback\/\",\"name\":\"(Solved) How to access the correct `this` inside a callback - JassWeb\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#website\"},\"datePublished\":\"2022-08-20T15:12:34+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-access-the-correct-this-inside-a-callback\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/jassweb.com\/solved\/solved-how-to-access-the-correct-this-inside-a-callback\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-access-the-correct-this-inside-a-callback\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/jassweb.com\/solved\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"(Solved) How to access the correct `this` inside a callback\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/jassweb.com\/solved\/#website\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"name\":\"JassWeb\",\"description\":\"Build High-quality Websites\",\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/jassweb.com\/solved\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\",\"name\":\"Jass Web\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"contentUrl\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"width\":693,\"height\":132,\"caption\":\"Jass Web\"},\"image\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\",\"name\":\"Kirat\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750\",\"contentUrl\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750\",\"caption\":\"Kirat\"},\"sameAs\":[\"http:\/\/jassweb.com\"],\"url\":\"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"(Solved) How to access the correct `this` inside a callback - JassWeb","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:\/\/jassweb.com\/solved\/solved-how-to-access-the-correct-this-inside-a-callback\/","og_locale":"en_US","og_type":"article","og_title":"(Solved) How to access the correct `this` inside a callback - JassWeb","og_description":"[ad_1] What you should know about this this (aka &#8220;the context&#8221;) is a special keyword inside each function and its value only depends on how the function was called, not how\/when\/where it was defined. It is not affected by lexical scopes like other variables (except for arrow functions, see below). Here are some examples: function ... Read more","og_url":"https:\/\/jassweb.com\/solved\/solved-how-to-access-the-correct-this-inside-a-callback\/","og_site_name":"JassWeb","article_published_time":"2022-08-20T15:12:34+00:00","author":"Kirat","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kirat","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jassweb.com\/solved\/solved-how-to-access-the-correct-this-inside-a-callback\/#article","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/solved-how-to-access-the-correct-this-inside-a-callback\/"},"author":{"name":"Kirat","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31"},"headline":"(Solved) How to access the correct `this` inside a callback","datePublished":"2022-08-20T15:12:34+00:00","mainEntityOfPage":{"@id":"https:\/\/jassweb.com\/solved\/solved-how-to-access-the-correct-this-inside-a-callback\/"},"wordCount":670,"publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"keywords":["callback","javascript","this"],"articleSection":["Solved"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/jassweb.com\/solved\/solved-how-to-access-the-correct-this-inside-a-callback\/","url":"https:\/\/jassweb.com\/solved\/solved-how-to-access-the-correct-this-inside-a-callback\/","name":"(Solved) How to access the correct `this` inside a callback - JassWeb","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/#website"},"datePublished":"2022-08-20T15:12:34+00:00","breadcrumb":{"@id":"https:\/\/jassweb.com\/solved\/solved-how-to-access-the-correct-this-inside-a-callback\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jassweb.com\/solved\/solved-how-to-access-the-correct-this-inside-a-callback\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jassweb.com\/solved\/solved-how-to-access-the-correct-this-inside-a-callback\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jassweb.com\/solved\/"},{"@type":"ListItem","position":2,"name":"(Solved) How to access the correct `this` inside a callback"}]},{"@type":"WebSite","@id":"https:\/\/jassweb.com\/solved\/#website","url":"https:\/\/jassweb.com\/solved\/","name":"JassWeb","description":"Build High-quality Websites","publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jassweb.com\/solved\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/jassweb.com\/solved\/#organization","name":"Jass Web","url":"https:\/\/jassweb.com\/solved\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/","url":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","contentUrl":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","width":693,"height":132,"caption":"Jass Web"},"image":{"@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31","name":"Kirat","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/","url":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750","contentUrl":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750","caption":"Kirat"},"sameAs":["http:\/\/jassweb.com"],"url":"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/"}]}},"_links":{"self":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/3860","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/comments?post=3860"}],"version-history":[{"count":0,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/3860\/revisions"}],"wp:attachment":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/media?parent=3860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/categories?post=3860"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/tags?post=3860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}