{"id":420,"date":"2024-06-11T11:41:52","date_gmt":"2024-06-11T11:41:52","guid":{"rendered":"https:\/\/www.xopsschool.com\/tutorials\/?p=420"},"modified":"2024-06-11T11:41:52","modified_gmt":"2024-06-11T11:41:52","slug":"prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case","status":"publish","type":"post","link":"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/","title":{"rendered":"Prioritizing Search Results in SQL: An In-Depth Explanation (SQL order by case)"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"491\" src=\"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/06\/image-31-1024x491.png\" alt=\"\" class=\"wp-image-421\" srcset=\"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/06\/image-31-1024x491.png 1024w, https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/06\/image-31-300x144.png 300w, https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/06\/image-31-768x368.png 768w, https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/06\/image-31.png 1141w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>When working with databases, especially in applications like healthcare management systems where search accuracy and prioritization are crucial, it&#8217;s essential to ensure that search results are both relevant and well-ordered. One common scenario is prioritizing search results based on specific conditions. In this blog post, we\u2019ll delve into how to achieve this using SQL&#8217;s ORDER BY clause with a special focus on the orderByRaw method.<\/p>\n\n\n\n<p>The Problem: Prioritizing Hospital Names in Search Results<br>Imagine you&#8217;re developing a healthcare management system, and you need to search for hospitals. Users might search for a hospital by name, and you want the results to prioritize hospitals whose names closely match the search keyword. If a hospital&#8217;s name contains the keyword, it should appear at the top of the list. another hospitals should follow in alphabetical order.<\/p>\n\n\n\n<p>The Solution: Using ORDER BY CASE in SQL<br>To prioritize search results based on specific conditions, we can use the CASE statement within the ORDER BY clause. Here\u2019s a breakdown of how to implement this in SQL:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\r\nSELECT * FROM hospitals\r\nORDER BY CASE \r\n            WHEN hospitals.name LIKE '%$Keyword%' THEN 1 \r\n            ELSE 2 \r\n         END, \r\n         hospitals.name;<\/code><\/pre>\n\n\n\n<p>This query does the following:<\/p>\n\n\n\n<p>Prioritize Matches: The CASE statement assigns a value of 1 to hospitals whose names contain the search keyword (LIKE &#8216;%$Keyword%&#8217;). Hospitals that do not contain the keyword are assigned a value of 2.<br>Order by Name: After prioritizing hospitals that match the keyword, it orders all hospitals alphabetically by name.<br>Integrating with an ORM: Using orderByRaw<br>When using an Object-Relational Mapping (ORM) tool like Eloquent in Laravel, you can achieve the same effect using the orderByRaw method. Here\u2019s how you can translate the SQL logic into Eloquent:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$hospitals = Hospital::orderByRaw(\r\n    \"CASE WHEN hospitals.name LIKE ? THEN 1 ELSE 2 END, hospitals.name\", \r\n    &#91;\"%$Keyword%\"]\r\n)->get();\r\n<\/code><\/pre>\n\n\n\n<p>Let\u2019s break down this Eloquent query:<\/p>\n\n\n\n<p>orderByRaw Method: This allows you to write raw SQL within an Eloquent query.<br>CASE Statement: Similar to the raw SQL, the CASE statement in orderByRaw assigns a value based on whether the hospital name contains the keyword.<br>Parameters: The LIKE clause uses a parameterized query (?), which is then replaced by [&#8220;%$Keyword%&#8221;]. This ensures the query is safe from SQL injection attacks.<br>Step-by-Step Execution<br>User Input: The user enters a keyword to search for hospitals.<br>Query Construction: The application constructs a query using Eloquent with the orderByRaw method.<br>CASE Evaluation: The CASE statement evaluates each hospital name to see if it contains the keyword.<br>Ordering: Hospitals with names containing the keyword are given priority (THEN 1). Others are ordered secondarily (ELSE 2), and finally, all results are sorted alphabetically by hospital name.<br>Results: The query returns a list of hospitals, prioritized by relevance to the search keyword and ordered alphabetically.<br>Benefits of This Approach<br>Relevance: Ensures that the most relevant results (i.e., those containing the search keyword) appear first.<br>Simplicity: Easy to understand and maintain within the query logic.<br>Security: Uses parameterized queries to prevent SQL injection.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When working with databases, especially in applications like healthcare management systems where search accuracy and prioritization are crucial, it&#8217;s essential to ensure that search results are both relevant and well-ordered. One common scenario is prioritizing search results based on specific conditions. In this blog post, we\u2019ll delve into how to achieve this using SQL&#8217;s ORDER &#8230; <a title=\"Prioritizing Search Results in SQL: An In-Depth Explanation (SQL order by case)\" class=\"read-more\" href=\"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/\" aria-label=\"Read more about Prioritizing Search Results in SQL: An In-Depth Explanation (SQL order by case)\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[254,261,257,256,258,266,58,251,264,202,259,263,253,250,262,252,265,255,260,66],"class_list":["post-420","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-database-management","tag-database-programming","tag-database-search","tag-eloquent-orm","tag-healthcare-management-system","tag-keyword-search","tag-laravel","tag-order-by-clause","tag-orm-methods","tag-php","tag-prioritizing-search-results","tag-raw-sql","tag-search-optimization","tag-sql","tag-sql-best-practices","tag-sql-case-statement","tag-sql-injection-prevention","tag-sql-query","tag-sql-tutorial","tag-web-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Prioritizing Search Results in SQL: An In-Depth Explanation (SQL order by case) - XOps Tutorials!!!<\/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:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Prioritizing Search Results in SQL: An In-Depth Explanation (SQL order by case) - XOps Tutorials!!!\" \/>\n<meta property=\"og:description\" content=\"When working with databases, especially in applications like healthcare management systems where search accuracy and prioritization are crucial, it&#8217;s essential to ensure that search results are both relevant and well-ordered. One common scenario is prioritizing search results based on specific conditions. In this blog post, we\u2019ll delve into how to achieve this using SQL&#8217;s ORDER ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/\" \/>\n<meta property=\"og:site_name\" content=\"XOps Tutorials!!!\" \/>\n<meta property=\"article:published_time\" content=\"2024-06-11T11:41:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/06\/image-31-1024x491.png\" \/>\n<meta name=\"author\" content=\"Avinash Kumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Avinash Kumar\" \/>\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.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/\"},\"author\":{\"name\":\"Avinash Kumar\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/fa5aa374a3698a6b72f0a260e0bda0b8\"},\"headline\":\"Prioritizing Search Results in SQL: An In-Depth Explanation (SQL order by case)\",\"datePublished\":\"2024-06-11T11:41:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/\"},\"wordCount\":466,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/06\/image-31-1024x491.png\",\"keywords\":[\"Database Management\",\"Database Programming\",\"Database Search\",\"Eloquent ORM\",\"Healthcare Management System\",\"Keyword Search\",\"laravel\",\"ORDER BY Clause\",\"ORM Methods\",\"PHP\",\"Prioritizing Search Results\",\"Raw SQL\",\"Search Optimization\",\"SQL\",\"SQL Best Practices\",\"SQL CASE Statement\",\"SQL Injection Prevention\",\"SQL Query\",\"SQL Tutorial\",\"web development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/\",\"url\":\"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/\",\"name\":\"Prioritizing Search Results in SQL: An In-Depth Explanation (SQL order by case) - XOps Tutorials!!!\",\"isPartOf\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/06\/image-31-1024x491.png\",\"datePublished\":\"2024-06-11T11:41:52+00:00\",\"author\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/fa5aa374a3698a6b72f0a260e0bda0b8\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/#primaryimage\",\"url\":\"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/06\/image-31.png\",\"contentUrl\":\"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/06\/image-31.png\",\"width\":1141,\"height\":547},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.xopsschool.com\/tutorials\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Prioritizing Search Results in SQL: An In-Depth Explanation (SQL order by case)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#website\",\"url\":\"https:\/\/www.xopsschool.com\/tutorials\/\",\"name\":\"XOps Tutorials!!!\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.xopsschool.com\/tutorials\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/fa5aa374a3698a6b72f0a260e0bda0b8\",\"name\":\"Avinash Kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/db01f522798b98f8f474a1dfdd200df1c0e7ada232088d7a8192e14919e4de0a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/db01f522798b98f8f474a1dfdd200df1c0e7ada232088d7a8192e14919e4de0a?s=96&d=mm&r=g\",\"caption\":\"Avinash Kumar\"},\"url\":\"https:\/\/www.xopsschool.com\/tutorials\/author\/avinash\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Prioritizing Search Results in SQL: An In-Depth Explanation (SQL order by case) - XOps Tutorials!!!","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.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/","og_locale":"en_US","og_type":"article","og_title":"Prioritizing Search Results in SQL: An In-Depth Explanation (SQL order by case) - XOps Tutorials!!!","og_description":"When working with databases, especially in applications like healthcare management systems where search accuracy and prioritization are crucial, it&#8217;s essential to ensure that search results are both relevant and well-ordered. One common scenario is prioritizing search results based on specific conditions. In this blog post, we\u2019ll delve into how to achieve this using SQL&#8217;s ORDER ... Read more","og_url":"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/","og_site_name":"XOps Tutorials!!!","article_published_time":"2024-06-11T11:41:52+00:00","og_image":[{"url":"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/06\/image-31-1024x491.png","type":"","width":"","height":""}],"author":"Avinash Kumar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Avinash Kumar","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/#article","isPartOf":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/"},"author":{"name":"Avinash Kumar","@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/fa5aa374a3698a6b72f0a260e0bda0b8"},"headline":"Prioritizing Search Results in SQL: An In-Depth Explanation (SQL order by case)","datePublished":"2024-06-11T11:41:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/"},"wordCount":466,"commentCount":0,"image":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/#primaryimage"},"thumbnailUrl":"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/06\/image-31-1024x491.png","keywords":["Database Management","Database Programming","Database Search","Eloquent ORM","Healthcare Management System","Keyword Search","laravel","ORDER BY Clause","ORM Methods","PHP","Prioritizing Search Results","Raw SQL","Search Optimization","SQL","SQL Best Practices","SQL CASE Statement","SQL Injection Prevention","SQL Query","SQL Tutorial","web development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/","url":"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/","name":"Prioritizing Search Results in SQL: An In-Depth Explanation (SQL order by case) - XOps Tutorials!!!","isPartOf":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/#primaryimage"},"image":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/#primaryimage"},"thumbnailUrl":"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/06\/image-31-1024x491.png","datePublished":"2024-06-11T11:41:52+00:00","author":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/fa5aa374a3698a6b72f0a260e0bda0b8"},"breadcrumb":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/#primaryimage","url":"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/06\/image-31.png","contentUrl":"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/06\/image-31.png","width":1141,"height":547},{"@type":"BreadcrumbList","@id":"https:\/\/www.xopsschool.com\/tutorials\/prioritizing-search-results-in-sql-an-in-depth-explanation-sql-order-by-case\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.xopsschool.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Prioritizing Search Results in SQL: An In-Depth Explanation (SQL order by case)"}]},{"@type":"WebSite","@id":"https:\/\/www.xopsschool.com\/tutorials\/#website","url":"https:\/\/www.xopsschool.com\/tutorials\/","name":"XOps Tutorials!!!","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.xopsschool.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/fa5aa374a3698a6b72f0a260e0bda0b8","name":"Avinash Kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/db01f522798b98f8f474a1dfdd200df1c0e7ada232088d7a8192e14919e4de0a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/db01f522798b98f8f474a1dfdd200df1c0e7ada232088d7a8192e14919e4de0a?s=96&d=mm&r=g","caption":"Avinash Kumar"},"url":"https:\/\/www.xopsschool.com\/tutorials\/author\/avinash\/"}]}},"_links":{"self":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts\/420","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/comments?post=420"}],"version-history":[{"count":1,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts\/420\/revisions"}],"predecessor-version":[{"id":422,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts\/420\/revisions\/422"}],"wp:attachment":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/media?parent=420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/categories?post=420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/tags?post=420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}