{"id":6256,"date":"2019-04-08T10:05:20","date_gmt":"2019-04-08T10:05:20","guid":{"rendered":"https:\/\/www.botreetechnologies.com\/blog\/?p=6256"},"modified":"2020-12-07T16:45:07","modified_gmt":"2020-12-07T11:15:07","slug":"interesting-methods-to-work-with-ruby-hashes-in-a-better-way","status":"publish","type":"post","link":"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/","title":{"rendered":"Interesting Methods to Work with Ruby Hashes in A Better Way"},"content":{"rendered":"\n<p>Ruby hashes are one of the most powerful data structures of Ruby. It comes with many inbuilt methods which we are using on a daily basis and still, there are many other options about which we are not aware of.<\/p>\n\n\n\n<p>In this tutorial, I am going to share some bad-good-better solutions for using <a href=\"https:\/\/www.tutorialspoint.com\/ruby\/ruby_hashes.htm\" target=\"_blank\" rel=\"noopener noreferrer\">Ruby hashes<\/a>.<\/p>\n\n\n\n<p>By using such advance or shorthand ways, we can make our code more readable, easy to debug and reuse.<\/p>\n\n\n\n<p>Here I am going to share some code snippets of such usage and will see how we can make it better or best.<\/p>\n\n\n\n<p><strong>Point &#8211; 1:<\/strong> No need to explicitly check whether particular params is present or not. We can directly compare params with our comparison statements.<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/NaiyaShah-BTC\/b0ca01b82a2a6a1658c82cf5f5fe642c.js\"><\/script><\/p>\n\n\n\n<p><strong>Point &#8211; 2:<\/strong> While merging keys and values to some other hash, we usually add curly braces. Actually, that is redundant. No need for such curly braces. We can directly do it like below.<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/NaiyaShah-BTC\/ddba5b30ed560f912a9e5c08e512cd14.js\"><\/script><\/p>\n\n\n\n<p>It will work as expected.<\/p>\n\n\n\n<p><strong>Point &#8211; 3:<\/strong> It is always problematic while working with nested hash and we are not certain about our data.<\/p>\n\n\n\n<p>Let&#8217;s assume that we have a column named properties and it stores hash data like given below:<\/p>\n\n\n\n<p>As mentioned above, there are different examples that you may have to handle. In general, we simply add conditions before accessing the name key from the hash.<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/NaiyaShah-BTC\/6c26c987555c338838b796565f2d7505.js\"><\/script><\/p>\n\n\n\n<p>As mentioned above, there are different examples that you may have to handle. In general, we simply add conditions before accessing the name key from a hash.<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/NaiyaShah-BTC\/9a6956dbf17b84bf89dd108a1731de13.js\"><\/script><\/p>\n\n\n\n<p>As you know the principle, <strong>Tell, Don\u2019t Ask<\/strong>, Instead of questioning for presence we should directly access the value of name. If you want to verify the presence of the key and then returning the value of the same, we can use the <strong>#dig<\/strong> method:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/ruby-dig.png\" alt=\"Ruby Dig\" class=\"wp-image-13577\" width=\"512\" height=\"288\" srcset=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/ruby-dig.png 1024w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/ruby-dig-300x169.png 300w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/ruby-dig-768x432.png 768w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/figure><\/div>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/NaiyaShah-BTC\/b5ab4a92dd20ec6d0e813ce951fed29b.js\"><\/script><\/p>\n\n\n\n<p>The <strong>hash#dig<\/strong> method will not throw an error and returns nil, in case of key not available. The behavior of ruby methods <strong>Hash#try<\/strong> and <strong>Hash#dig<\/strong> are same but when applying on nested hash, dig method is more readable and looks decent then <strong>Hash#try<\/strong> method.<\/p>\n\n\n\n<p><strong>Point &#8211; 4:<\/strong> Now let\u2019s consider a scenario where you have to fetch details from the hash and if it is not present then return some default value. For example here, we have a hash of employee details containing their name and city. If any employee\u2019s details not present and you want that your query returns default value then you can use <strong>Hash#fetch<\/strong> method.<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/NaiyaShah-BTC\/1cb0288b7e8decc07341847a59170aaa.js\"><\/script><\/p>\n\n\n\n<p>I suggest using a hash cautiously in your code. Try to use the methods explained above to make your code more readable and efficient.<\/p>\n\n\n\n<p>Have a happy coding!<\/p>\n\n\n\n<p><a href=\"https:\/\/www.botreetechnologies.com\/ruby-on-rails-development\"><strong><b>Click here for more<\/b> details&#8230;<\/strong><\/a><\/p>\n\n\n\n<p>At<a href=\"https:\/\/www.botreetechnologies.com\/\"> BoTree Technologies<\/a>, we build enterprise applications with our RoR team of 25+ engineers.<\/p>\n\n\n\n<p>We also specialize in Python, RPA, AI, Django, JavaScript and ReactJS.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/www.botreetechnologies.com\/contact\">Consulting is free<\/a> &#8211; let us help you grow!<\/h3>\n","protected":false},"excerpt":{"rendered":"<p>Ruby hashes are one of the most powerful data structures&#8230;<\/p>\n","protected":false},"author":24,"featured_media":13570,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73,10],"tags":[],"class_list":["post-6256","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ruby-on-rails","category-technology"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Interesting Methods to Work with Ruby Hashes in A Better Way<\/title>\n<meta name=\"description\" content=\"Learn more about important methods for ruby hashes. Taking care of some mistakes while accessing ruby hashes and working on it.\" \/>\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\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Interesting Methods to Work with Ruby Hashes in A Better Way\" \/>\n<meta property=\"og:description\" content=\"Learn more about important methods for ruby hashes. Taking care of some mistakes while accessing ruby hashes and working on it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/\" \/>\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=\"2019-04-08T10:05:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-07T11:15:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2019\/04\/ruby-hashes.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1280\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Naiya Shah\" \/>\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=\"Naiya Shah\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/\"},\"author\":{\"name\":\"Naiya Shah\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/68f8340395086b417feb15b21211bf8c\"},\"headline\":\"Interesting Methods to Work with Ruby Hashes in A Better Way\",\"datePublished\":\"2019-04-08T10:05:20+00:00\",\"dateModified\":\"2020-12-07T11:15:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/\"},\"wordCount\":486,\"commentCount\":10,\"image\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2019\/04\/ruby-hashes.jpg\",\"articleSection\":[\"Ruby on Rails\",\"Technology\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/\",\"name\":\"Interesting Methods to Work with Ruby Hashes in A Better Way\",\"isPartOf\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2019\/04\/ruby-hashes.jpg\",\"datePublished\":\"2019-04-08T10:05:20+00:00\",\"dateModified\":\"2020-12-07T11:15:07+00:00\",\"author\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/68f8340395086b417feb15b21211bf8c\"},\"description\":\"Learn more about important methods for ruby hashes. Taking care of some mistakes while accessing ruby hashes and working on it.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/#primaryimage\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2019\/04\/ruby-hashes.jpg\",\"contentUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2019\/04\/ruby-hashes.jpg\",\"width\":1920,\"height\":1280,\"caption\":\"ruby hashes documentation\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.botreetechnologies.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Interesting Methods to Work with Ruby Hashes in A Better Way\"}]},{\"@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\/68f8340395086b417feb15b21211bf8c\",\"name\":\"Naiya Shah\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/naiya-shah-150x150.png\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/naiya-shah-150x150.png\",\"contentUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/naiya-shah-150x150.png\",\"caption\":\"Naiya Shah\"},\"description\":\"Naiya is a Ruby on Rails Developer. She developes applications with optimization and clean code with full Rspec coverage. She works in Javascript as well and she digs into anything new really quickly and comes up with a solution. Her leisure activities include travelling and watching movies.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Interesting Methods to Work with Ruby Hashes in A Better Way","description":"Learn more about important methods for ruby hashes. Taking care of some mistakes while accessing ruby hashes and working on it.","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\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/","og_locale":"en_US","og_type":"article","og_title":"Interesting Methods to Work with Ruby Hashes in A Better Way","og_description":"Learn more about important methods for ruby hashes. Taking care of some mistakes while accessing ruby hashes and working on it.","og_url":"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/","og_site_name":"BoTree Technologies","article_publisher":"https:\/\/www.facebook.com\/BoTreeTechnologies\/","article_published_time":"2019-04-08T10:05:20+00:00","article_modified_time":"2020-12-07T11:15:07+00:00","og_image":[{"width":1920,"height":1280,"url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2019\/04\/ruby-hashes.jpg","type":"image\/jpeg"}],"author":"Naiya Shah","twitter_card":"summary_large_image","twitter_creator":"@BoTreeTech","twitter_site":"@BoTreeTech","twitter_misc":{"Written by":"Naiya Shah","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/#article","isPartOf":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/"},"author":{"name":"Naiya Shah","@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/68f8340395086b417feb15b21211bf8c"},"headline":"Interesting Methods to Work with Ruby Hashes in A Better Way","datePublished":"2019-04-08T10:05:20+00:00","dateModified":"2020-12-07T11:15:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/"},"wordCount":486,"commentCount":10,"image":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/#primaryimage"},"thumbnailUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2019\/04\/ruby-hashes.jpg","articleSection":["Ruby on Rails","Technology"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/","url":"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/","name":"Interesting Methods to Work with Ruby Hashes in A Better Way","isPartOf":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/#primaryimage"},"image":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/#primaryimage"},"thumbnailUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2019\/04\/ruby-hashes.jpg","datePublished":"2019-04-08T10:05:20+00:00","dateModified":"2020-12-07T11:15:07+00:00","author":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/68f8340395086b417feb15b21211bf8c"},"description":"Learn more about important methods for ruby hashes. Taking care of some mistakes while accessing ruby hashes and working on it.","breadcrumb":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/#primaryimage","url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2019\/04\/ruby-hashes.jpg","contentUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2019\/04\/ruby-hashes.jpg","width":1920,"height":1280,"caption":"ruby hashes documentation"},{"@type":"BreadcrumbList","@id":"https:\/\/www.botreetechnologies.com\/blog\/interesting-methods-to-work-with-ruby-hashes-in-a-better-way\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.botreetechnologies.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Interesting Methods to Work with Ruby Hashes in A Better Way"}]},{"@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\/68f8340395086b417feb15b21211bf8c","name":"Naiya Shah","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/naiya-shah-150x150.png","url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/naiya-shah-150x150.png","contentUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/naiya-shah-150x150.png","caption":"Naiya Shah"},"description":"Naiya is a Ruby on Rails Developer. She developes applications with optimization and clean code with full Rspec coverage. She works in Javascript as well and she digs into anything new really quickly and comes up with a solution. Her leisure activities include travelling and watching movies."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/6256","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\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=6256"}],"version-history":[{"count":3,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/6256\/revisions"}],"predecessor-version":[{"id":13580,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/6256\/revisions\/13580"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/media\/13570"}],"wp:attachment":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=6256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=6256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=6256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}