{"id":1744,"date":"2017-05-19T06:16:02","date_gmt":"2017-05-19T06:16:02","guid":{"rendered":"https:\/\/www.botreetechnologies.com\/blog\/?p=1744"},"modified":"2020-12-10T19:05:46","modified_gmt":"2020-12-10T13:35:46","slug":"javascript-refactoring-nested-conditions-readable-code-using-recursion","status":"publish","type":"post","link":"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/","title":{"rendered":"Javascript Refactoring &#8211; Nested Conditions to Readable Code Using Recursion"},"content":{"rendered":"\n<p>I was working on the javascript code which required me to transform an algorithmic conditions into code. So first I have written the simple version as below.<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/ParthBarot-BoTreeConsulting\/04f4813c70245c3ed03558026eae4a08.js\"><\/script><\/p>\n\n\n\n<p>The above code is hard to read because there are different tests in the form of if-else conditions, and also the nesting is 3 to 4 levels deep! One way to improve this code is to replace such conditions with Boolean functions, and then move all the magic numbers in variables.<\/p>\n\n\n\n<p>But here, all the magic numbers are actually for the same purpose \/ value, we have to create a collection object &#8211; JSON as it is JavaScript. And if we see the conditions closely, it is checking the calculated value against a range and then setting the fixed value to the float. So, we cannot simply make variables for these numbers or replace the conditions with a straight forward Boolean methods.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What next?<\/h2>\n\n\n\n<p>To refactor this code, we have to first understand the whole logic and define a pseudo code. It looks something like following,<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/ParthBarot-BoTreeConsulting\/4811c4b9dba2acaf035d2bda1a6cbf24.js\"><\/script><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Now, from the above code it is clear that,<\/h3>\n\n\n\n<ol class=\"wp-block-list\"><li>There is a deep nesting, up to 3 levels. First we need to check over&nbsp;<b>myDataVal<\/b>, then inside that we need to check over&nbsp;<b>amount<\/b> and then inside that we need to check&nbsp;<b>calculatedVal<\/b>. So there is a relation between these data points, which we can define as a collection. In Javascript, we can create a JSON object holding all these data points and then write down a code to iterate over it and decide what to return.<\/li><li>Each condition is basically checking that the given value falls in the range or not. So this is the second candidate for refactoring. We can have a function which gives us Boolean value confirming if range has the number or not.<\/li><\/ol>\n\n\n\n<p>So, let us do these two points first.<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/ParthBarot-BoTreeConsulting\/e55f992af9b6e957250c23c9004448c8.js\"><\/script><\/p>\n\n\n\n<p>Ok, Now We have moved the data-points\/configurable-numbers in the data object as shown, and converted the code to use that object. But this is still complex, I would say complex than the previous version of code! Also, if we want to add one more nested level, then this method would get complicated having 4th nested for loop inside!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Now What?<\/h3>\n\n\n\n<p>If we closely look at this version, we can see that the for loop is repeated thrice. It is doing the same thing again and again &#8211; validating the number with the array, looping over the internal <a href=\"http:\/\/www.json.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">JSON<\/a> object and keep iterating until it reaches the level where it can access the JSON key&nbsp;&#8216;<b>fixedVal<\/b>&#8216;.<\/p>\n\n\n\n<p>So we can say still this code is not following DRY (Do not Repeat Yourself). To fix it, we need to remove the repetition. Let us recall the factorial problem, we can compare it with that. In most of the programming languages, iteration with repetition can be replaced with recursion! So lets see if we can refactor this again using recursive function. For that we need to consider the following,<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>For loop can be replace with the recursive function such that same function calls itself until done.<\/li><li>There are three diff. variables which are tested for inclusion in the range for each nested for loop &#8211; <b>myDataVal<\/b>,&nbsp;<b>amount<\/b> and&nbsp;<b>calculatedVal<\/b> as per this line &#8216;<b>this._isDataRangeMatches(myDataVal,keyRange1)&#8217;.<\/b>\n<ul>\n<li>So if we want to use recursion, we need to pass these variables in a way where the function can dynamically use them.<\/li>\n<li>Can we pass them as Array or JSON? Array could be simpler, but array would need to be ordered accordingly. But then how we are going to know that value from which index needs to be read for current recursion call?<\/li>\n<li>When we take a look at Array functions, there is one function called &#8216;.pop&#8217; which gives the object last pushed and removes it from the array, exactly the stack behavior &#8211; LIFO. So that means, we can stack these three variables in the array in the order we want them to be popped, and call the recursive function!<\/li>\n<\/ul>\n<\/li><li>All other objects can be passed in as it is because we can always access the inner objects using JSON keys.<\/li><\/ol>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/ParthBarot-BoTreeConsulting\/c15c9cf777f38af015a3094f4769067e.js\"><\/script><\/p>\n\n\n\n<p>Now the code looks cleaner! We always need to be cautious about the simplicity of the code and use logical ideas to resolve complex problems!<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><i>At&nbsp;<a href=\"https:\/\/www.botreetechnologies.com\/\" target=\"_blank\" rel=\"noopener noreferrer\"><b>BoTree Technologies<\/b><\/a>, we build web and&nbsp;mobile applications&nbsp;to add value to our client\u2019s business. We align ourselves to ensure that our client benefits the most out of our engagement.<\/i><\/p>\n\n\n\n<p><i>We work in&nbsp;<a href=\"https:\/\/www.botreetechnologies.com\/ruby-on-rails\" target=\"_blank\" rel=\"noopener noreferrer\">Ruby on Rails<\/a>,&nbsp;<a href=\"https:\/\/www.botreetechnologies.com\/python\" target=\"_blank\" rel=\"noopener noreferrer\">Python<\/a>, Java,&nbsp;<a href=\"https:\/\/www.botreetechnologies.com\/react-native-development\" target=\"_blank\" rel=\"noopener noreferrer\">React<\/a>, Android, iOS and&nbsp;<a href=\"https:\/\/www.botreetechnologies.com\/robotic-process-automation\" target=\"_blank\" rel=\"noopener noreferrer\">RPA<\/a>&nbsp;as well.<\/i><\/p>\n\n\n\n<p><i><a href=\"https:\/\/www.botreetechnologies.com\/contact\" target=\"_blank\" rel=\"noopener noreferrer\">Drop us a line<\/a>&nbsp;to discuss how can we help take your business to the next level.<\/i><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was working on the javascript code which required me&#8230;<\/p>\n","protected":false},"author":6,"featured_media":14511,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-1744","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Javascript Refactoring - Nested Conditions to Readable Code Using Recursion<\/title>\n<meta name=\"description\" content=\"Learn more about how to javascript refactoring and nested conditions to readable code using recursion.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Javascript Refactoring - Nested Conditions to Readable Code Using Recursion\" \/>\n<meta property=\"og:description\" content=\"Learn more about how to javascript refactoring and nested conditions to readable code using recursion.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/\" \/>\n<meta property=\"og:site_name\" content=\"BoTree Technologies\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/BoTreeTechnologies\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-05-19T06:16:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-10T13:35:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2017\/05\/javascript-refactoring.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"852\" \/>\n\t<meta property=\"og:image:height\" content=\"479\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Parth Barot\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@BoTreeTech\" \/>\n<meta name=\"twitter:site\" content=\"@BoTreeTech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Parth Barot\" \/>\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:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/\"},\"author\":{\"name\":\"Parth Barot\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1952b3c6679346e5a2792581a67b1b0f\"},\"headline\":\"Javascript Refactoring &#8211; Nested Conditions to Readable Code Using Recursion\",\"datePublished\":\"2017-05-19T06:16:02+00:00\",\"dateModified\":\"2020-12-10T13:35:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/\"},\"wordCount\":796,\"commentCount\":1,\"image\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2017\/05\/javascript-refactoring.jpg\",\"articleSection\":[\"Technology\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/\",\"name\":\"Javascript Refactoring - Nested Conditions to Readable Code Using Recursion\",\"isPartOf\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2017\/05\/javascript-refactoring.jpg\",\"datePublished\":\"2017-05-19T06:16:02+00:00\",\"dateModified\":\"2020-12-10T13:35:46+00:00\",\"author\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1952b3c6679346e5a2792581a67b1b0f\"},\"description\":\"Learn more about how to javascript refactoring and nested conditions to readable code using recursion.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/#primaryimage\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2017\/05\/javascript-refactoring.jpg\",\"contentUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2017\/05\/javascript-refactoring.jpg\",\"width\":852,\"height\":479,\"caption\":\"Javascript Refactoring\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.botreetechnologies.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Javascript Refactoring &#8211; Nested Conditions to Readable Code Using Recursion\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#website\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/\",\"name\":\"BoTree Technologies\",\"description\":\"Committed to inspire generation.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.botreetechnologies.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1952b3c6679346e5a2792581a67b1b0f\",\"name\":\"Parth Barot\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/parth-barot-150x150.png\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/parth-barot-150x150.png\",\"contentUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/parth-barot-150x150.png\",\"caption\":\"Parth Barot\"},\"description\":\"Parth is the co-founder and CTO at BoTree Technologies. He has worked on building products in different domains and technologies. He is now managing research and pre-sales by supporting it with his problem-solving approach.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Javascript Refactoring - Nested Conditions to Readable Code Using Recursion","description":"Learn more about how to javascript refactoring and nested conditions to readable code using recursion.","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:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/","og_locale":"en_US","og_type":"article","og_title":"Javascript Refactoring - Nested Conditions to Readable Code Using Recursion","og_description":"Learn more about how to javascript refactoring and nested conditions to readable code using recursion.","og_url":"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/","og_site_name":"BoTree Technologies","article_publisher":"https:\/\/www.facebook.com\/BoTreeTechnologies\/","article_published_time":"2017-05-19T06:16:02+00:00","article_modified_time":"2020-12-10T13:35:46+00:00","og_image":[{"width":852,"height":479,"url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2017\/05\/javascript-refactoring.jpg","type":"image\/jpeg"}],"author":"Parth Barot","twitter_card":"summary_large_image","twitter_creator":"@BoTreeTech","twitter_site":"@BoTreeTech","twitter_misc":{"Written by":"Parth Barot","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/#article","isPartOf":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/"},"author":{"name":"Parth Barot","@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1952b3c6679346e5a2792581a67b1b0f"},"headline":"Javascript Refactoring &#8211; Nested Conditions to Readable Code Using Recursion","datePublished":"2017-05-19T06:16:02+00:00","dateModified":"2020-12-10T13:35:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/"},"wordCount":796,"commentCount":1,"image":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/#primaryimage"},"thumbnailUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2017\/05\/javascript-refactoring.jpg","articleSection":["Technology"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/","url":"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/","name":"Javascript Refactoring - Nested Conditions to Readable Code Using Recursion","isPartOf":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/#primaryimage"},"image":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/#primaryimage"},"thumbnailUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2017\/05\/javascript-refactoring.jpg","datePublished":"2017-05-19T06:16:02+00:00","dateModified":"2020-12-10T13:35:46+00:00","author":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1952b3c6679346e5a2792581a67b1b0f"},"description":"Learn more about how to javascript refactoring and nested conditions to readable code using recursion.","breadcrumb":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/#primaryimage","url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2017\/05\/javascript-refactoring.jpg","contentUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2017\/05\/javascript-refactoring.jpg","width":852,"height":479,"caption":"Javascript Refactoring"},{"@type":"BreadcrumbList","@id":"https:\/\/www.botreetechnologies.com\/blog\/javascript-refactoring-nested-conditions-readable-code-using-recursion\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.botreetechnologies.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Javascript Refactoring &#8211; Nested Conditions to Readable Code Using Recursion"}]},{"@type":"WebSite","@id":"https:\/\/www.botreetechnologies.com\/blog\/#website","url":"https:\/\/www.botreetechnologies.com\/blog\/","name":"BoTree Technologies","description":"Committed to inspire generation.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.botreetechnologies.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1952b3c6679346e5a2792581a67b1b0f","name":"Parth Barot","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/parth-barot-150x150.png","url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/parth-barot-150x150.png","contentUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/parth-barot-150x150.png","caption":"Parth Barot"},"description":"Parth is the co-founder and CTO at BoTree Technologies. He has worked on building products in different domains and technologies. He is now managing research and pre-sales by supporting it with his problem-solving approach."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/1744","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=1744"}],"version-history":[{"count":1,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/1744\/revisions"}],"predecessor-version":[{"id":14512,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/1744\/revisions\/14512"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/media\/14511"}],"wp:attachment":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=1744"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=1744"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=1744"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}