{"id":131,"date":"2015-03-30T23:26:50","date_gmt":"2015-03-30T20:26:50","guid":{"rendered":"https:\/\/burakcaliskan.org\/blog\/?p=131"},"modified":"2015-03-30T23:35:14","modified_gmt":"2015-03-30T20:35:14","slug":"javascript-get-method-function","status":"publish","type":"post","link":"https:\/\/burakcaliskan.org\/blog\/javascript-get-method-function\/","title":{"rendered":"Javascript GET Method Function"},"content":{"rendered":"<p><img loading=\"lazy\" class=\" size-full wp-image-132 aligncenter\" src=\"https:\/\/burakcaliskan.org\/blog\/depo\/2015\/03\/javascript-get-method-function.png\" alt=\"javascript-get-method-function\" width=\"594\" height=\"413\" srcset=\"https:\/\/burakcaliskan.org\/blog\/depo\/2015\/03\/javascript-get-method-function.png 594w, https:\/\/burakcaliskan.org\/blog\/depo\/2015\/03\/javascript-get-method-function-300x209.png 300w\" sizes=\"(max-width: 594px) 100vw, 594px\" \/>&lt;script&gt;<br \/>\nvar GET = (function(a) {<br \/>\n<span style=\"line-height: 1.5;\">if (a == &#8220;&#8221;) return {};<br \/>\n<\/span><span style=\"line-height: 1.5;\">var b = {};<\/span><\/p>\n<p>for (var i = 0; i &lt; a.length; ++i)<br \/>\n{<br \/>\nvar p=a[i].split(&#8216;=&#8217;, 2);<br \/>\nif (p.length == 1)<br \/>\nb[p[0]] = &#8220;&#8221;;<br \/>\nelse<br \/>\nb[p[0]] = decodeURIComponent(p[1].replace(\/\\+\/g, &#8221; &#8220;));<br \/>\n}<br \/>\nreturn b;<br \/>\n})(window.location.search.substr(1).split(&#8216;&amp;&#8217;));<\/p>\n<p>alert(GET[&#8220;burak&#8221;]);<br \/>\nalert(GET[&#8220;caliskan&#8221;]);<br \/>\n&lt;\/script&gt;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&lt;script&gt; var GET = (function(a) { if (a == &#8220;&#8221;) return {}; var b = {}; for (var i = 0; i &lt; a.length; ++i) { var p=a[i].split(&#8216;=&#8217;, 2); if (p.length == 1) b[p[0]] = &#8220;&#8221;; else b[p[0]] = decodeURIComponent(p[1].replace(\/\\+\/g, &#8221; &#8220;)); } return b; })(window.location.search.substr(1).split(&#8216;&amp;&#8217;)); alert(GET[&#8220;burak&#8221;]); alert(GET[&#8220;caliskan&#8221;]); &lt;\/script&gt;<\/p>\n","protected":false},"author":2,"featured_media":135,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[63,20],"tags":[58,59,60,61,56,62,57],"_links":{"self":[{"href":"https:\/\/burakcaliskan.org\/blog\/wp-json\/wp\/v2\/posts\/131"}],"collection":[{"href":"https:\/\/burakcaliskan.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/burakcaliskan.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/burakcaliskan.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/burakcaliskan.org\/blog\/wp-json\/wp\/v2\/comments?post=131"}],"version-history":[{"count":2,"href":"https:\/\/burakcaliskan.org\/blog\/wp-json\/wp\/v2\/posts\/131\/revisions"}],"predecessor-version":[{"id":136,"href":"https:\/\/burakcaliskan.org\/blog\/wp-json\/wp\/v2\/posts\/131\/revisions\/136"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/burakcaliskan.org\/blog\/wp-json\/wp\/v2\/media\/135"}],"wp:attachment":[{"href":"https:\/\/burakcaliskan.org\/blog\/wp-json\/wp\/v2\/media?parent=131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/burakcaliskan.org\/blog\/wp-json\/wp\/v2\/categories?post=131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/burakcaliskan.org\/blog\/wp-json\/wp\/v2\/tags?post=131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}