{"id":236991,"date":"2020-03-06T12:35:23","date_gmt":"2020-03-06T12:35:23","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=236991"},"modified":"2020-03-06T12:55:36","modified_gmt":"2020-03-06T12:55:36","slug":"destructuring-assignment-of-variables","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/","title":{"rendered":"Destructuring assignment of variables"},"content":{"rendered":"\n<p>Hi coders, we will know about a very interesting topic <strong>destructuring assignment of variables<\/strong> in this reading, and I hope somehow it will help you in daily coding challenge.<\/p>\n\n\n\n<p>The destructuring assignment of variable is a process to unpack the value from arrays, or properties from objects, into distinct variables, that looks similar to array or object literals.<\/p>\n\n\n\n<p>Here, we will see the examples in PHP and JavaScript syntax. If you are familiar with <strong>ES6<\/strong>, may very well aware of destructuring. Let&#8217;s first see the JavaScript destructuring assignment.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Destructuring Assignment in JavaScript<\/h4>\n\n\n\n<p>Normal variable values assignment-<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">const variable = [1, 2, 3, 4, 5];\nconst a = variable[0];\nconst b = variable[1];\nconst c = variable[2];\nconsole.log(a); \/\/ 1\nconsole.log(b); \/\/ 2\nconsole.log(c); \/\/ 3<\/pre>\n\n\n\n<p>The destructuring assignment uses similar syntax, but on the left-hand side of the assignment to define what values to unpack from the sourced variable<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">const x = [1, 2, 3, 4, 5];\nconst [y, z] = x;\nconsole.log(y); \/\/ 1\nconsole.log(z); \/\/ 2<\/pre>\n\n\n\n<p>Without destructuring assignment, you might access the first three items in an array like this:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">var arr = [10, 20, 15, 25, 50];\nvar a = arr[0];\nvar b = arr[1];\nvar c = arr[2];\n\n\/\/ With destructuring assignment, the equivalent code becomes more concise and readable:\n\nvar [a, b, c] = arr;\n\n\/\/ On console.log(a), output is 10 in both the above cases<\/pre>\n\n\n\n<p>Example for Destructuring assignment of Object-<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">let a, b, rest;\nlet obj = {name: &#039;John Deo&#039;, age: 30, id: 400, houseNumber: 40};\n{a, b, ...rest} = obj;\nconsole.log(a); \/\/ &#039;John Deo&#039;\nconsole.log(b); \/\/ 30\nconsole.log(rest); \/\/ {id: 400, houseNumber: 40}<\/pre>\n\n\n\n<p>When destructuring an array, you can unpack and assign the remaining part of it to a variable using the rest pattern as given in the above example. Be aware that a syntax error will be thrown if a trailing comma is used on the left-hand side with a rest element:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">const [a, ...b,] = [1, 2, 3];\n\n\/\/ SyntaxError: rest element may not have a trailing comma\n\/\/ Always consider using rest operator as the last element<\/pre>\n\n\n\n<p>We can also use destructuring assignment while calling a function like-<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">getUserProperty = ()=&gt; {\n   return [\n      &#039;John Deo&#039;,\n      &#039;demo@webkul.com&#039;,\n      101\n   ]\n};\n\nvar [name, email, id] = getUserProperty();\nconsole.log(name, email, id) \/\/ Output- &#039;John Deo&#039;, &#039;demo@webkul.com&#039;, 101<\/pre>\n\n\n\n<p>You can also skip the starting values in the array being destructured like-<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">var [,,c] = [&quot;fish&quot;, &quot;buzz&quot;, &quot;buzzfish&quot;];\nconsole.log(c);\n\/\/ &quot;buzzfish&quot;<\/pre>\n\n\n\n<p>Destructuring on empty object will assign undefined-<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">var { emptyObj } = {};\nconsole.log(emptyObj);\n\/\/ undefined<\/pre>\n\n\n\n<p>Keep in mind, while destructuring assignment there must be keyword <strong>let<\/strong>, <strong>const<\/strong> or <strong>var<\/strong> because while destructuring, it declare variables first then assigns the values.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Destructuring Assignment in PHP<\/h4>\n\n\n\n<p>The Destructuring Assignment in PHP like in Javascript was introduced in PHP version 7.1.0. In PHP, the destructuring  is only possible for <a href=\"https:\/\/www.php.net\/manual\/en\/migration71.new-features.php#migration71.new-features.symmetric-array-destructuring\">Symmetric Array<\/a> , not for Object. It is an alternative of PHP function <a href=\"https:\/\/www.php.net\/manual\/en\/function.list.php\">list<\/a> which now can be used with shorthand <em>array syntax<\/em>([]).<\/p>\n\n\n\n<p>Let&#8217;s take an example of <a href=\"https:\/\/www.php.net\/manual\/en\/function.list.php\">list<\/a> &#8211;<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">$user = [&#039;Demo Webkul&#039;, &#039;demo@webkul.com&#039;, &#039;101&#039;];\nlist($name, $email, $id) = $user;<\/pre>\n\n\n\n<p>Using Destructuring Assignment-<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">[$name, $email, $id] = $user;<\/pre>\n\n\n\n<p>Destructuring in <em>foreach<\/em> loop-<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">$users = [\n   [101, &#039;Demo Webkul&#039;, &#039;demo@webkul.com&#039;],\n   [102, &#039;John Deo&#039;, &#039;test@webkul.com&#039;],\n   [103, &#039;Patrik Deo&#039;, &#039;test1@webkul.com&#039;]\n];\n\n\/\/ list() style\nlist($id1, $name1, $email1) = $users[0];\n\n\/\/ Destructuring ([]) style\n[$id1, $name1, $email] = $users[0];\n\n\/\/ list() style\nforeach ($users as list($id, $name, $email)) {\n    \/\/ logic here with $id, $name and $email\n}\n\n\/\/ Destructuring ([]) style\nforeach ($data as [$id, $name, $email]) {\n    \/\/ logic here with $id, $name and $email\n}<\/pre>\n\n\n\n<p>Destructuring using a <em>function<\/em>&#8211;<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\nclass Destructuring {\n  protected $a = &#039;Alphabet A&#039;;\n  protected $b = &#039;Alphabet B&#039;;\n  protected $c = &#039;Alphabet C&#039;;\n\n  public function getA() {\n    return $this-&gt;a;\n  }\n\n  public function getB() {\n    return $this-&gt;b;\n  }\n\n  public function getC() {\n    return $this-&gt;c;\n  }\n\n  public function getAllAlphabets() {\n    return [$this-&gt;a, $this-&gt;b, $this-&gt;c];\n  }\n}\n\n$des = new Destructuring();\n\/\/ To get all the alphabets and assign the values in variables calling getAllAlphabets()\n[$a, $b, $c] = $des-&gt;getAllAlphabets();\necho $a; \/\/ &#039;Alphabet A&#039;\necho $b; \/\/ &#039;Alphabet B&#039;\necho $c; \/\/ &#039;Alphabet C&#039;<\/pre>\n\n\n\n<p>We can call get method of properties one by one to get a single property value but it may be somehow long methodology so here comes the <strong>Destructuring<\/strong> <strong>Assignment<\/strong> to reduce our code.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">I hope you really enjoyed this reading, Happy Codding.<\/h4>\n\n\n\n<p class=\"has-background has-vivid-cyan-blue-background-color\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi coders, we will know about a very interesting topic destructuring assignment of variables in this reading, and I hope somehow it will help you in daily coding challenge. The destructuring assignment of variable is a process to unpack the value from arrays, or properties from objects, into distinct variables, that looks similar to array <a href=\"https:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":210,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[198,13],"tags":[],"class_list":["post-236991","post","type-post","status-publish","format-standard","hentry","category-javascript","category-php"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Destructuring assignment of variables - Webkul Blog<\/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:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Destructuring assignment of variables - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Hi coders, we will know about a very interesting topic destructuring assignment of variables in this reading, and I hope somehow it will help you in daily coding challenge. The destructuring assignment of variable is a process to unpack the value from arrays, or properties from objects, into distinct variables, that looks similar to array [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-06T12:35:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-03-06T12:55:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-og.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Govinda\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Govinda\" \/>\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:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/\"},\"author\":{\"name\":\"Govinda\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/9c51ad8b87589f515f26d21cf5c1ad10\"},\"headline\":\"Destructuring assignment of variables\",\"datePublished\":\"2020-03-06T12:35:23+00:00\",\"dateModified\":\"2020-03-06T12:55:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/\"},\"wordCount\":358,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"articleSection\":[\"JavaScript\",\"php\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/\",\"url\":\"https:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/\",\"name\":\"Destructuring assignment of variables - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"datePublished\":\"2020-03-06T12:35:23+00:00\",\"dateModified\":\"2020-03-06T12:55:36+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Destructuring assignment of variables\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/9c51ad8b87589f515f26d21cf5c1ad10\",\"name\":\"Govinda\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/560d6eb6f8cd9adf90ad07f9777551516db25f10ed8ef13bb52d054c399fb5f4?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/560d6eb6f8cd9adf90ad07f9777551516db25f10ed8ef13bb52d054c399fb5f4?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Govinda\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/govinda-mandal491\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Destructuring assignment of variables - Webkul Blog","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:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/","og_locale":"en_US","og_type":"article","og_title":"Destructuring assignment of variables - Webkul Blog","og_description":"Hi coders, we will know about a very interesting topic destructuring assignment of variables in this reading, and I hope somehow it will help you in daily coding challenge. The destructuring assignment of variable is a process to unpack the value from arrays, or properties from objects, into distinct variables, that looks similar to array [...]","og_url":"https:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2020-03-06T12:35:23+00:00","article_modified_time":"2020-03-06T12:55:36+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-og.png","type":"image\/png"}],"author":"Govinda","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Govinda","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/"},"author":{"name":"Govinda","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/9c51ad8b87589f515f26d21cf5c1ad10"},"headline":"Destructuring assignment of variables","datePublished":"2020-03-06T12:35:23+00:00","dateModified":"2020-03-06T12:55:36+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/"},"wordCount":358,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"articleSection":["JavaScript","php"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/","url":"https:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/","name":"Destructuring assignment of variables - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"datePublished":"2020-03-06T12:35:23+00:00","dateModified":"2020-03-06T12:55:36+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/destructuring-assignment-of-variables\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Destructuring assignment of variables"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/9c51ad8b87589f515f26d21cf5c1ad10","name":"Govinda","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/560d6eb6f8cd9adf90ad07f9777551516db25f10ed8ef13bb52d054c399fb5f4?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/560d6eb6f8cd9adf90ad07f9777551516db25f10ed8ef13bb52d054c399fb5f4?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Govinda"},"url":"https:\/\/webkul.com\/blog\/author\/govinda-mandal491\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/236991","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/210"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=236991"}],"version-history":[{"count":16,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/236991\/revisions"}],"predecessor-version":[{"id":237031,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/236991\/revisions\/237031"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=236991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=236991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=236991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}