{"id":2287,"date":"2024-08-05T14:25:53","date_gmt":"2024-08-05T13:25:53","guid":{"rendered":"https:\/\/codeflarelimited.com\/blog\/?p=2287"},"modified":"2024-08-05T14:46:15","modified_gmt":"2024-08-05T13:46:15","slug":"removing-duplicates-from-an-array","status":"publish","type":"post","link":"https:\/\/codeflarelimited.com\/blog\/removing-duplicates-from-an-array\/","title":{"rendered":"Removing Duplicates from an Array in JavaScript"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>Handling duplicate values is a common task in programming. Whether you\u2019re dealing with user input, processing data, or cleaning up datasets, removing duplicates is essential for maintaining data integrity and ensuring accuracy. In JavaScript, there are several ways to remove duplicates from an array, each with its own advantages and use cases. This article explores various methods to remove duplicates from an array, including traditional approaches and modern solutions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Why Remove Duplicates?<\/strong><\/h2>\n\n\n\n<p>Removing duplicates from an array helps in:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Data Integrity<\/strong>: Ensures that data is unique and consistent.<\/li>\n\n\n\n<li><strong>Performance<\/strong>: Optimizes data processing and querying.<\/li>\n\n\n\n<li><strong>User Experience<\/strong>: Provides cleaner and more relevant results for users.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Methods to Remove Duplicates<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. Using a Set<\/strong><\/h3>\n\n\n\n<p>The Set object in JavaScript automatically removes duplicate values. This is one of the simplest and most efficient ways to eliminate duplicates.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">const array = [1, 2, 2, 3, 4, 4, 5];\nconst uniqueArray = [...new Set(array)];\n\nconsole.log(uniqueArray); \/\/ Output: [1, 2, 3, 4, 5]\n<\/code><\/pre>\n\n\n\n<p><strong>Explanation<\/strong>: A Set only stores unique values. By converting the array to a Set and then back to an array, we effectively remove duplicates.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. Using Filter and IndexOf<\/strong><\/h3>\n\n\n\n<p>The <code>filter<\/code> method combined with <code>indexOf<\/code> can also be used to remove duplicates.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">const array = [1, 2, 2, 3, 4, 4, 5];\nconst uniqueArray = array.filter((value, index, self) =&gt; self.indexOf(value) === index);\n\nconsole.log(uniqueArray); \/\/ Output: [1, 2, 3, 4, 5]\n<\/code><\/pre>\n\n\n\n<p><strong>Explanation<\/strong>: The <code>filter<\/code> method iterates over the array, and <code>indexOf<\/code> checks if the current value&#8217;s first occurrence is at the current index. If it is, the value is unique and included in the result.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. Using Reduce<\/strong><\/h3>\n\n\n\n<p>The <code>reduce<\/code> method can be used to accumulate unique values into a new array.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">const array = [1, 2, 2, 3, 4, 4, 5];\nconst uniqueArray = array.reduce((accumulator, value) =&gt; {\n    if (!accumulator.includes(value)) {\n        accumulator.push(value);\n    }\n    return accumulator;\n}, []);\n\nconsole.log(uniqueArray); \/\/ Output: [1, 2, 3, 4, 5]\n<\/code><\/pre>\n\n\n\n<p><strong>Explanation<\/strong>: The <code>reduce<\/code> method builds a new array by checking if the current value already exists in the accumulator array. If it doesn\u2019t, it adds the value to the accumulator.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. Using a Helper Function with Object Keys<\/strong><\/h3>\n\n\n\n<p>A helper function that leverages object keys can also remove duplicates efficiently.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">function removeDuplicates(arr) {\n    const obj = {};\n    return arr.filter(item =&gt; !obj.hasOwnProperty(item) &amp;&amp; (obj[item] = true));\n}\n\nconst array = [1, 2, 2, 3, 4, 4, 5];\nconst uniqueArray = removeDuplicates(array);\n\nconsole.log(uniqueArray); \/\/ Output: [1, 2, 3, 4, 5]\n<\/code><\/pre>\n\n\n\n<p><strong>Explanation<\/strong>: This method uses an object to keep track of items that have already been encountered. By checking the object\u2019s keys, it filters out duplicates.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Best Practices<\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Choose the Right Method<\/strong>: Depending on your data and performance needs, choose the method that best suits your requirements. For example, using <code>Set<\/code> is generally the most efficient for removing duplicates from a large array.<\/li>\n\n\n\n<li><strong>Handle Complex Data<\/strong>: If working with arrays of objects, you might need a more sophisticated approach, such as comparing specific object properties to determine uniqueness.<\/li>\n\n\n\n<li><strong>Consider Performance<\/strong>: For very large arrays, consider performance implications. Methods using <code>Set<\/code> and <code>reduce<\/code> are generally more efficient than methods involving <code>indexOf<\/code>.<\/li>\n\n\n\n<li><strong>Test with Different Scenarios<\/strong>: Ensure that your chosen method works correctly with various input scenarios, including edge cases.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>Removing duplicates from an array in JavaScript is a common but essential task. With methods ranging from simple Set conversions to more elaborate reduce-based approaches, you have multiple tools at your disposal to handle duplicates effectively. By understanding and applying these techniques, you can ensure your data remains clean and accurate.<\/p>\n\n\n\n<p><a href=\"https:\/\/codeflarelimited.com\/blog\/react-form-validation\/\">React Form Validation<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Handling duplicate values is a common task in programming. Whether you\u2019re dealing with user input, processing data,<\/p>\n","protected":false},"author":3,"featured_media":2292,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[24],"tags":[99],"class_list":["post-2287","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programming","tag-software-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Removing duplicates from an array<\/title>\n<meta name=\"description\" content=\"Learn practical techniques and examples for removing duplicates from an array with our comprehensive guide.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codeflarelimited.com\/blog\/removing-duplicates-from-an-array\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Removing duplicates from an array\" \/>\n<meta property=\"og:description\" content=\"Learn practical techniques and examples for removing duplicates from an array with our comprehensive guide.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codeflarelimited.com\/blog\/removing-duplicates-from-an-array\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-08-05T13:25:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-05T13:46:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/08\/IMG-20240805-WA0003.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1080\" \/>\n\t<meta property=\"og:image:height\" content=\"607\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Kene Samuel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/removing-duplicates-from-an-array\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/removing-duplicates-from-an-array\\\/\"},\"author\":{\"name\":\"Kene Samuel\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/person\\\/c501609bab46c16807eb32106074f206\"},\"headline\":\"Removing Duplicates from an Array in JavaScript\",\"datePublished\":\"2024-08-05T13:25:53+00:00\",\"dateModified\":\"2024-08-05T13:46:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/removing-duplicates-from-an-array\\\/\"},\"wordCount\":456,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/removing-duplicates-from-an-array\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/IMG-20240805-WA0003.jpg\",\"keywords\":[\"software development\"],\"articleSection\":[\"programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/removing-duplicates-from-an-array\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/removing-duplicates-from-an-array\\\/\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/removing-duplicates-from-an-array\\\/\",\"name\":\"Removing duplicates from an array\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/removing-duplicates-from-an-array\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/removing-duplicates-from-an-array\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/IMG-20240805-WA0003.jpg\",\"datePublished\":\"2024-08-05T13:25:53+00:00\",\"dateModified\":\"2024-08-05T13:46:15+00:00\",\"description\":\"Learn practical techniques and examples for removing duplicates from an array with our comprehensive guide.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/removing-duplicates-from-an-array\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/removing-duplicates-from-an-array\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/removing-duplicates-from-an-array\\\/#primaryimage\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/IMG-20240805-WA0003.jpg\",\"contentUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/IMG-20240805-WA0003.jpg\",\"width\":1080,\"height\":607},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/removing-duplicates-from-an-array\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"programming\",\"item\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/programming\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Removing Duplicates from an Array in JavaScript\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\",\"name\":\"\",\"description\":\"Sustainable solutions\",\"publisher\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\",\"name\":\"Codeflare Limited\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/codeflare.png\",\"contentUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/codeflare.png\",\"width\":1040,\"height\":263,\"caption\":\"Codeflare Limited\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/person\\\/c501609bab46c16807eb32106074f206\",\"name\":\"Kene Samuel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g\",\"caption\":\"Kene Samuel\"},\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/author\\\/kene\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Removing duplicates from an array","description":"Learn practical techniques and examples for removing duplicates from an array with our comprehensive guide.","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:\/\/codeflarelimited.com\/blog\/removing-duplicates-from-an-array\/","og_locale":"en_US","og_type":"article","og_title":"Removing duplicates from an array","og_description":"Learn practical techniques and examples for removing duplicates from an array with our comprehensive guide.","og_url":"https:\/\/codeflarelimited.com\/blog\/removing-duplicates-from-an-array\/","article_published_time":"2024-08-05T13:25:53+00:00","article_modified_time":"2024-08-05T13:46:15+00:00","og_image":[{"width":1080,"height":607,"url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/08\/IMG-20240805-WA0003.jpg","type":"image\/jpeg"}],"author":"Kene Samuel","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/codeflarelimited.com\/blog\/removing-duplicates-from-an-array\/#article","isPartOf":{"@id":"https:\/\/codeflarelimited.com\/blog\/removing-duplicates-from-an-array\/"},"author":{"name":"Kene Samuel","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/person\/c501609bab46c16807eb32106074f206"},"headline":"Removing Duplicates from an Array in JavaScript","datePublished":"2024-08-05T13:25:53+00:00","dateModified":"2024-08-05T13:46:15+00:00","mainEntityOfPage":{"@id":"https:\/\/codeflarelimited.com\/blog\/removing-duplicates-from-an-array\/"},"wordCount":456,"commentCount":0,"publisher":{"@id":"https:\/\/codeflarelimited.com\/blog\/#organization"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/removing-duplicates-from-an-array\/#primaryimage"},"thumbnailUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/08\/IMG-20240805-WA0003.jpg","keywords":["software development"],"articleSection":["programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codeflarelimited.com\/blog\/removing-duplicates-from-an-array\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codeflarelimited.com\/blog\/removing-duplicates-from-an-array\/","url":"https:\/\/codeflarelimited.com\/blog\/removing-duplicates-from-an-array\/","name":"Removing duplicates from an array","isPartOf":{"@id":"https:\/\/codeflarelimited.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codeflarelimited.com\/blog\/removing-duplicates-from-an-array\/#primaryimage"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/removing-duplicates-from-an-array\/#primaryimage"},"thumbnailUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/08\/IMG-20240805-WA0003.jpg","datePublished":"2024-08-05T13:25:53+00:00","dateModified":"2024-08-05T13:46:15+00:00","description":"Learn practical techniques and examples for removing duplicates from an array with our comprehensive guide.","breadcrumb":{"@id":"https:\/\/codeflarelimited.com\/blog\/removing-duplicates-from-an-array\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codeflarelimited.com\/blog\/removing-duplicates-from-an-array\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeflarelimited.com\/blog\/removing-duplicates-from-an-array\/#primaryimage","url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/08\/IMG-20240805-WA0003.jpg","contentUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/08\/IMG-20240805-WA0003.jpg","width":1080,"height":607},{"@type":"BreadcrumbList","@id":"https:\/\/codeflarelimited.com\/blog\/removing-duplicates-from-an-array\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codeflarelimited.com\/blog\/"},{"@type":"ListItem","position":2,"name":"programming","item":"https:\/\/codeflarelimited.com\/blog\/programming\/"},{"@type":"ListItem","position":3,"name":"Removing Duplicates from an Array in JavaScript"}]},{"@type":"WebSite","@id":"https:\/\/codeflarelimited.com\/blog\/#website","url":"https:\/\/codeflarelimited.com\/blog\/","name":"","description":"Sustainable solutions","publisher":{"@id":"https:\/\/codeflarelimited.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codeflarelimited.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codeflarelimited.com\/blog\/#organization","name":"Codeflare Limited","url":"https:\/\/codeflarelimited.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2020\/11\/codeflare.png","contentUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2020\/11\/codeflare.png","width":1040,"height":263,"caption":"Codeflare Limited"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/person\/c501609bab46c16807eb32106074f206","name":"Kene Samuel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g","caption":"Kene Samuel"},"url":"https:\/\/codeflarelimited.com\/blog\/author\/kene\/"}]}},"jetpack_featured_media_url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/08\/IMG-20240805-WA0003.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/2287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/comments?post=2287"}],"version-history":[{"count":1,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/2287\/revisions"}],"predecessor-version":[{"id":2289,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/2287\/revisions\/2289"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/media\/2292"}],"wp:attachment":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/media?parent=2287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/categories?post=2287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/tags?post=2287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}