{"id":6173,"date":"2024-01-11T16:40:00","date_gmt":"2024-01-11T16:40:00","guid":{"rendered":"https:\/\/codehim.com\/?p=6173"},"modified":"2024-01-22T14:43:14","modified_gmt":"2024-01-22T09:43:14","slug":"javascript-drag-and-drop-reorder-list","status":"publish","type":"post","link":"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/","title":{"rendered":"JavaScript Drag and Drop Reorder List &#038; Div"},"content":{"rendered":"<p>This lightweight JavaScript code snippet helps you to create drag and drop reorder list functionality. It allows you to rearrange any elements within a parent node with a class name <code>\"drag-sort-enable\"<\/code> or anything with an event function <code>handleDrag()<\/code> and <code>handleDrop()<\/code>. This code snippet doesn&#8217;t support touch devices to <a href=\"https:\/\/codehim.com\/others\/jquery-drag-and-drop-from-one-list-to-another\/\" target=\"_blank\" rel=\"noopener\">sort lists with the drag and drop<\/a> method. Anyhow, it is useful for desktop version webpages\/apps to allow users to sort lists by the drag and drop method.<\/p>\n<h2>How to create JavaScript Drag and Drop Reorder List<\/h2>\n<p>1. In HTML, create a ul element with the class name <code>\"drag-sort-enable\"<\/code> and place your list items inside it. Basically, you can add this class name to your existing list or any parent element whose child elements you want to rearrangeable.<\/p>\n<pre class=\"prettyprint linenums lang-html\">  &lt;ul class=\"drag-sort-enable\"&gt;\r\n    &lt;li&gt;Application&lt;\/li&gt;\r\n    &lt;li&gt;Blank&lt;\/li&gt;\r\n    &lt;li&gt;Class&lt;\/li&gt;\r\n    &lt;li&gt;Data&lt;\/li&gt;\r\n    &lt;li&gt;Element&lt;\/li&gt;\r\n  &lt;\/ul&gt;\r\n<\/pre>\n<p>2. The CSS styles for the rearrangeable lists are optional. Anyhow, you need to set styles for the class <code>\"drag-sort-active\"<\/code>. It shows the active styles when lists are dragging. The CSS styles for the unordered list can be defined according to your needs.<\/p>\n<pre class=\"prettyprint linenums lang-css\">ul {\r\n    margin: 0;\r\n    padding: 0;\r\n}\r\n\r\nli {\r\n    margin: 5px 0;\r\n    padding: 0 20px;\r\n    height: 40px;\r\n    line-height: 40px;\r\n    border-radius: 3px;\r\n    background: #e52d27;  \/* fallback for old browsers *\/\r\n    background: -webkit-linear-gradient(to right, #b31217, #e52d27);  \/* Chrome 10-25, Safari 5.1-6 *\/\r\n    background: linear-gradient(to right, #b31217, #e52d27); \/* W3C, IE 10+\/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ *\/\r\n\r\n    color: #fff;\r\n    list-style: none;\r\n}\r\n\r\nli.drag-sort-active {\r\n    background: transparent;\r\n    color: transparent;\r\n    border: 1px solid #4ca1af;\r\n}\r\n\r\nspan.drag-sort-active {\r\n    background: transparent;\r\n    color: transparent;\r\n}\r\n<\/pre>\n<p>3. Finally, add the following JavaScript function between the &lt;script&gt; and &lt;\/script&gt; tag before closing the body tag.<\/p>\n<pre class=\"prettyprint linenums lang-js\">\/* Made with love by @fitri\r\n This is a component of my ReactJS project\r\nhttps:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list *\/\r\n\r\nfunction enableDragSort(listClass) {\r\n  const sortableLists = document.getElementsByClassName(listClass);\r\n  Array.prototype.map.call(sortableLists, (list) =&gt; {enableDragList(list)});\r\n}\r\n\r\nfunction enableDragList(list) {\r\n  Array.prototype.map.call(list.children, (item) =&gt; {enableDragItem(item)});\r\n}\r\n\r\nfunction enableDragItem(item) {\r\n  item.setAttribute('draggable', true)\r\n  item.ondrag = handleDrag;\r\n  item.ondragend = handleDrop;\r\n}\r\n\r\nfunction handleDrag(item) {\r\n  const selectedItem = item.target,\r\n        list = selectedItem.parentNode,\r\n        x = event.clientX,\r\n        y = event.clientY;\r\n  \r\n  selectedItem.classList.add('drag-sort-active');\r\n  let swapItem = document.elementFromPoint(x, y) === null ? selectedItem : document.elementFromPoint(x, y);\r\n  \r\n  if (list === swapItem.parentNode) {\r\n    swapItem = swapItem !== selectedItem.nextSibling ? swapItem : swapItem.nextSibling;\r\n    list.insertBefore(selectedItem, swapItem);\r\n  }\r\n}\r\n\r\nfunction handleDrop(item) {\r\n  item.target.classList.remove('drag-sort-active');\r\n}\r\n\r\n(()=&gt; {enableDragSort('drag-sort-enable')})();\r\n<\/pre>\n<p>That&#8217;s all! hopefully, you have successfully integrated this drag and drop reorder list into your project. If you have any questions or facing any issues, feel free to comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This lightweight JavaScript code snippet helps you to create drag and drop reorder list functionality. It allows you to rearrange&#8230;<\/p>\n","protected":false},"author":1,"featured_media":6216,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[116],"tags":[],"class_list":["post-6173","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vanilla-javascript"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JavaScript Drag and Drop Reorder List &amp; Div &#8212; CodeHim<\/title>\n<meta name=\"description\" content=\"Here is a lightweight JavaScript code snippet to create drag and drop reorder list. You can view demo and download code for sorting list.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript Drag and Drop Reorder List &amp; Div &#8212; CodeHim\" \/>\n<meta property=\"og:description\" content=\"Here is a lightweight JavaScript code snippet to create drag and drop reorder list. You can view demo and download code for sorting list.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/\" \/>\n<meta property=\"og:site_name\" content=\"CodeHim\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codehimofficial\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-11T16:40:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-22T09:43:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codehim.com\/wp-content\/uploads\/2022\/04\/javascript-drag-and-drop-reorder-list.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"900\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Asif Mughal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CodeHimOfficial\" \/>\n<meta name=\"twitter:site\" content=\"@CodeHimOfficial\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Asif Mughal\" \/>\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:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/\"},\"author\":{\"name\":\"Asif Mughal\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\"},\"headline\":\"JavaScript Drag and Drop Reorder List &#038; Div\",\"datePublished\":\"2024-01-11T16:40:00+00:00\",\"dateModified\":\"2024-01-22T09:43:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/\"},\"wordCount\":223,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2022\/04\/javascript-drag-and-drop-reorder-list.png\",\"articleSection\":[\"Vanilla JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/\",\"url\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/\",\"name\":\"JavaScript Drag and Drop Reorder List & Div &#8212; CodeHim\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2022\/04\/javascript-drag-and-drop-reorder-list.png\",\"datePublished\":\"2024-01-11T16:40:00+00:00\",\"dateModified\":\"2024-01-22T09:43:14+00:00\",\"description\":\"Here is a lightweight JavaScript code snippet to create drag and drop reorder list. You can view demo and download code for sorting list.\",\"breadcrumb\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/#primaryimage\",\"url\":\"https:\/\/codehim.com\/wp-content\/uploads\/2022\/04\/javascript-drag-and-drop-reorder-list.png\",\"contentUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2022\/04\/javascript-drag-and-drop-reorder-list.png\",\"width\":1200,\"height\":900,\"caption\":\"JavaScript Drag and Drop Reorder List\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/codehim.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Vanilla JavaScript\",\"item\":\"https:\/\/codehim.com\/category\/vanilla-javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"JavaScript Drag and Drop Reorder List &#038; Div\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/codehim.com\/#website\",\"url\":\"https:\/\/codehim.com\/\",\"name\":\"CodeHim\",\"description\":\"Web Design Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"alternateName\":\"Web Design Codes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/codehim.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/codehim.com\/#organization\",\"name\":\"CodeHim - Web Design Code & Scripts\",\"url\":\"https:\/\/codehim.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg\",\"contentUrl\":\"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg\",\"width\":280,\"height\":280,\"caption\":\"CodeHim - Web Design Code & Scripts\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/codehimofficial\",\"https:\/\/x.com\/CodeHimOfficial\",\"https:\/\/www.instagram.com\/codehim\/\",\"https:\/\/www.linkedin.com\/company\/codehim\",\"https:\/\/co.pinterest.com\/codehim\/\",\"https:\/\/www.youtube.com\/@codehim\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\",\"name\":\"Asif Mughal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g\",\"caption\":\"Asif Mughal\"},\"description\":\"I code and create web elements for amazing people around the world. I like work with new people. New people new Experiences. I truly enjoy what I'm doing, which makes me more passionate about web development and coding. I am always ready to do challenging tasks whether it is about creating a custom CMS from scratch or customizing an existing system.\",\"sameAs\":[\"https:\/\/codehim.com\"],\"url\":\"https:\/\/codehim.com\/author\/asif-mughal\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JavaScript Drag and Drop Reorder List & Div &#8212; CodeHim","description":"Here is a lightweight JavaScript code snippet to create drag and drop reorder list. You can view demo and download code for sorting list.","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:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/","og_locale":"en_US","og_type":"article","og_title":"JavaScript Drag and Drop Reorder List & Div &#8212; CodeHim","og_description":"Here is a lightweight JavaScript code snippet to create drag and drop reorder list. You can view demo and download code for sorting list.","og_url":"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/","og_site_name":"CodeHim","article_publisher":"https:\/\/www.facebook.com\/codehimofficial","article_published_time":"2024-01-11T16:40:00+00:00","article_modified_time":"2024-01-22T09:43:14+00:00","og_image":[{"width":1200,"height":900,"url":"https:\/\/codehim.com\/wp-content\/uploads\/2022\/04\/javascript-drag-and-drop-reorder-list.png","type":"image\/png"}],"author":"Asif Mughal","twitter_card":"summary_large_image","twitter_creator":"@CodeHimOfficial","twitter_site":"@CodeHimOfficial","twitter_misc":{"Written by":"Asif Mughal","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/#article","isPartOf":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/"},"author":{"name":"Asif Mughal","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed"},"headline":"JavaScript Drag and Drop Reorder List &#038; Div","datePublished":"2024-01-11T16:40:00+00:00","dateModified":"2024-01-22T09:43:14+00:00","mainEntityOfPage":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/"},"wordCount":223,"commentCount":1,"publisher":{"@id":"https:\/\/codehim.com\/#organization"},"image":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2022\/04\/javascript-drag-and-drop-reorder-list.png","articleSection":["Vanilla JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/","url":"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/","name":"JavaScript Drag and Drop Reorder List & Div &#8212; CodeHim","isPartOf":{"@id":"https:\/\/codehim.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/#primaryimage"},"image":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2022\/04\/javascript-drag-and-drop-reorder-list.png","datePublished":"2024-01-11T16:40:00+00:00","dateModified":"2024-01-22T09:43:14+00:00","description":"Here is a lightweight JavaScript code snippet to create drag and drop reorder list. You can view demo and download code for sorting list.","breadcrumb":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/#primaryimage","url":"https:\/\/codehim.com\/wp-content\/uploads\/2022\/04\/javascript-drag-and-drop-reorder-list.png","contentUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2022\/04\/javascript-drag-and-drop-reorder-list.png","width":1200,"height":900,"caption":"JavaScript Drag and Drop Reorder List"},{"@type":"BreadcrumbList","@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-drag-and-drop-reorder-list\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codehim.com\/"},{"@type":"ListItem","position":2,"name":"Vanilla JavaScript","item":"https:\/\/codehim.com\/category\/vanilla-javascript\/"},{"@type":"ListItem","position":3,"name":"JavaScript Drag and Drop Reorder List &#038; Div"}]},{"@type":"WebSite","@id":"https:\/\/codehim.com\/#website","url":"https:\/\/codehim.com\/","name":"CodeHim","description":"Web Design Code Snippets","publisher":{"@id":"https:\/\/codehim.com\/#organization"},"alternateName":"Web Design Codes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codehim.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codehim.com\/#organization","name":"CodeHim - Web Design Code & Scripts","url":"https:\/\/codehim.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/#\/schema\/logo\/image\/","url":"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg","contentUrl":"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg","width":280,"height":280,"caption":"CodeHim - Web Design Code & Scripts"},"image":{"@id":"https:\/\/codehim.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codehimofficial","https:\/\/x.com\/CodeHimOfficial","https:\/\/www.instagram.com\/codehim\/","https:\/\/www.linkedin.com\/company\/codehim","https:\/\/co.pinterest.com\/codehim\/","https:\/\/www.youtube.com\/@codehim"]},{"@type":"Person","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed","name":"Asif Mughal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g","caption":"Asif Mughal"},"description":"I code and create web elements for amazing people around the world. I like work with new people. New people new Experiences. I truly enjoy what I'm doing, which makes me more passionate about web development and coding. I am always ready to do challenging tasks whether it is about creating a custom CMS from scratch or customizing an existing system.","sameAs":["https:\/\/codehim.com"],"url":"https:\/\/codehim.com\/author\/asif-mughal\/"}]}},"views":25616,"_links":{"self":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/6173","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/comments?post=6173"}],"version-history":[{"count":0,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/6173\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media\/6216"}],"wp:attachment":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media?parent=6173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/categories?post=6173"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/tags?post=6173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}