{"id":5051,"date":"2012-02-02T13:18:06","date_gmt":"2012-02-02T07:48:06","guid":{"rendered":"https:\/\/2thenew.xyz\/blog\/?p=5051"},"modified":"2017-09-22T15:32:39","modified_gmt":"2017-09-22T10:02:39","slug":"alphanum-sort","status":"publish","type":"post","link":"https:\/\/2thenew.xyz\/blog\/alphanum-sort\/","title":{"rendered":"Alphanumeric Sorting using Criteria Query (with MySQL database)"},"content":{"rendered":"<p>I am working on a Grails application with MySQL database. I\u00a0had a use case in which I had to implement alphanumeric sorting using Criteria Query on Grails. By alphanumeric sorting I mean if there is a class Employee with field empId then on doing :<\/p>\n<p>[plain]<br \/>\nEmployee e1 = new Employee(empId:&#8217;emp10&#8242;).save()<br \/>\nEmployee e2 = new Employee(empId:&#8217;emp2&#8242;).save()<br \/>\nEmployee e3 = new Employee(empId:&#8217;emp1&#8242;).save()<br \/>\nEmployee e4 = new Employee(empId:&#8217;1emp&#8217;).save()<br \/>\nEmployee e5 = new Employee(empId:&#8217;10emp&#8217;).save()<br \/>\nEmployee e6 = new Employee(empId:&#8217;2emp&#8217;).save()<\/p>\n<p>Employee.createCriteria().list([sort:&#8217;empId&#8217;])<br \/>\n            \/* OR *\/<br \/>\nEmployee.createCriteria().list{<br \/>\n    order(&#8217;empId&#8217;)<br \/>\n}<br \/>\n[\/plain]<\/p>\n<p><strong>should give result like [e4,e6,e5,e3,e2,e1]<\/strong>. But according to sql sorting the <strong>result would be [e5,e4,e6,e3,e1,e2]<\/strong><\/p>\n<p>One thing to note was that criteria query implemented sorting at the database end.<br \/>\nAfter googling around, I came <a href=\"http:\/\/drupal.org\/project\/natsort\">across a script<\/a> that had a SQL function which converted the field value to string that can alphanumerically sorted easily at database end.<\/p>\n<p>To migrate the functions in script to database you have to unzip the script and write following command on terminal:<\/p>\n<p>[shell]mysql -u username -p database_name &lt; \/path\/to\/unzipped\/directory\/natsort.install.mysql[\/shell]<\/p>\n<p>Now only thing I had to do was to get a derived field from the Grails property that had to be sorted alphanumerically which was easily possible as the Grails had ability to create transient field using formula (thanks to wonderful <a href=\"https:\/\/2thenew.xyz\/blog\/create-transients-using-formula-in-grails\/\">Blog by Uday<\/a>). Thus I had to create a new transient field using SQL function in formula. So I did something like this :<\/p>\n<p>[groovy]<br \/>\nclass Employee {<br \/>\n    String empId<br \/>\n    String empIdSortField \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/\/transient field<br \/>\n    static mapping = {<br \/>\n        empIdSortField formula: &#8216;natsort_canon(empId, &quot;natural&quot;)&#8217;<br \/>\n    }<br \/>\n}<br \/>\n[\/groovy]<\/p>\n<p>Now if I had to get Employee objects are sorted by empId alphanumerically, what I would do is :<\/p>\n<p>[groovy]<br \/>\nEmployee.createCriteria().list {<br \/>\n    order(&#8217;empIdSortField&#8217;)<br \/>\n}<br \/>\n[\/groovy]<\/p>\n<p>Hope this was helpful to you!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am working on a Grails application with MySQL database. I\u00a0had a use case in which I had to implement alphanumeric sorting using Criteria Query on Grails. By alphanumeric sorting I mean if there is a class Employee with field empId then on doing : [plain] Employee e1 = new Employee(empId:&#8217;emp10&#8242;).save() Employee e2 = new [&hellip;]<\/p>\n","protected":false},"author":39,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":24,"footnotes":""},"categories":[7],"tags":[761,269,763,29,4840,762,76,760,505],"class_list":["post-5051","post","type-post","status-publish","format-standard","hentry","category-grails","tag-alphanumeric-sort","tag-criteria-query","tag-formula","tag-gorm","tag-grails","tag-human-sort","tag-mysql","tag-natural-sort","tag-sorting"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"I am working on a Grails application with MySQL database. I had a use case in which I had to implement alphanumeric sorting using Criteria Query on Grails. By alphanumeric sorting I mean if there is a class Employee with field empId then on doing : [plain] Employee e1 = new Employee(empId:&#039;emp10&#039;).save() Employee e2 = new\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Gaurav Sharma\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/2thenew.xyz\/blog\/alphanum-sort\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Alphanumeric Sorting using Criteria Query (with MySQL database) | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"I am working on a Grails application with MySQL database. I had a use case in which I had to implement alphanumeric sorting using Criteria Query on Grails. By alphanumeric sorting I mean if there is a class Employee with field empId then on doing : [plain] Employee e1 = new Employee(empId:&#039;emp10&#039;).save() Employee e2 = new\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/2thenew.xyz\/blog\/alphanum-sort\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Alphanumeric Sorting using Criteria Query (with MySQL database) | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"I am working on a Grails application with MySQL database. I had a use case in which I had to implement alphanumeric sorting using Criteria Query on Grails. By alphanumeric sorting I mean if there is a class Employee with field empId then on doing : [plain] Employee e1 = new Employee(empId:&#039;emp10&#039;).save() Employee e2 = new\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/alphanum-sort\\\/#article\",\"name\":\"Alphanumeric Sorting using Criteria Query (with MySQL database) | TO THE NEW Blog\",\"headline\":\"Alphanumeric Sorting using Criteria Query (with MySQL database)\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/gaurav-sharma\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2012-02-02T13:18:06+05:30\",\"dateModified\":\"2017-09-22T15:32:39+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":3,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/alphanum-sort\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/alphanum-sort\\\/#webpage\"},\"articleSection\":\"Grails, Alphanumeric Sort, criteria query, formula, GORM, Grails, Human Sort, MySql, Natural Sort, sorting\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/alphanum-sort\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"name\":\"Grails\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"position\":2,\"name\":\"Grails\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/alphanum-sort\\\/#listItem\",\"name\":\"Alphanumeric Sorting using Criteria Query (with MySQL database)\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/alphanum-sort\\\/#listItem\",\"position\":3,\"name\":\"Alphanumeric Sorting using Criteria Query (with MySQL database)\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"name\":\"Grails\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/gaurav-sharma\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/gaurav-sharma\\\/\",\"name\":\"Gaurav Sharma\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/alphanum-sort\\\/#authorImage\",\"url\":\"https:\\\/\\\/newersworld-sf-static.tothenew.net\\\/prod\\\/profilePicFolder\\\/a33fa680-a1a3-4d80-be97-6aaf7ad88e4a_364-Gaurav-Sharma-PROFILEPICTURE.jpeg\",\"width\":96,\"height\":96,\"caption\":\"Gaurav Sharma\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/alphanum-sort\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/alphanum-sort\\\/\",\"name\":\"Alphanumeric Sorting using Criteria Query (with MySQL database) | TO THE NEW Blog\",\"description\":\"I am working on a Grails application with MySQL database. I had a use case in which I had to implement alphanumeric sorting using Criteria Query on Grails. By alphanumeric sorting I mean if there is a class Employee with field empId then on doing : [plain] Employee e1 = new Employee(empId:'emp10').save() Employee e2 = new\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/alphanum-sort\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/gaurav-sharma\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/gaurav-sharma\\\/#author\"},\"datePublished\":\"2012-02-02T13:18:06+05:30\",\"dateModified\":\"2017-09-22T15:32:39+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Alphanumeric Sorting using Criteria Query (with MySQL database) | TO THE NEW Blog","description":"I am working on a Grails application with MySQL database. I had a use case in which I had to implement alphanumeric sorting using Criteria Query on Grails. By alphanumeric sorting I mean if there is a class Employee with field empId then on doing : [plain] Employee e1 = new Employee(empId:'emp10').save() Employee e2 = new","canonical_url":"https:\/\/2thenew.xyz\/blog\/alphanum-sort\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/2thenew.xyz\/blog\/alphanum-sort\/#article","name":"Alphanumeric Sorting using Criteria Query (with MySQL database) | TO THE NEW Blog","headline":"Alphanumeric Sorting using Criteria Query (with MySQL database)","author":{"@id":"https:\/\/2thenew.xyz\/blog\/author\/gaurav-sharma\/#author"},"publisher":{"@id":"https:\/\/2thenew.xyz\/blog\/#organization"},"datePublished":"2012-02-02T13:18:06+05:30","dateModified":"2017-09-22T15:32:39+05:30","inLanguage":"en-US","commentCount":3,"mainEntityOfPage":{"@id":"https:\/\/2thenew.xyz\/blog\/alphanum-sort\/#webpage"},"isPartOf":{"@id":"https:\/\/2thenew.xyz\/blog\/alphanum-sort\/#webpage"},"articleSection":"Grails, Alphanumeric Sort, criteria query, formula, GORM, Grails, Human Sort, MySql, Natural Sort, sorting"},{"@type":"BreadcrumbList","@id":"https:\/\/2thenew.xyz\/blog\/alphanum-sort\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog#listItem","position":1,"name":"Home","item":"https:\/\/2thenew.xyz\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/category\/grails\/#listItem","name":"Grails"}},{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/category\/grails\/#listItem","position":2,"name":"Grails","item":"https:\/\/2thenew.xyz\/blog\/category\/grails\/","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/alphanum-sort\/#listItem","name":"Alphanumeric Sorting using Criteria Query (with MySQL database)"},"previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/alphanum-sort\/#listItem","position":3,"name":"Alphanumeric Sorting using Criteria Query (with MySQL database)","previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/category\/grails\/#listItem","name":"Grails"}}]},{"@type":"Organization","@id":"https:\/\/2thenew.xyz\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/2thenew.xyz\/blog\/"},{"@type":"Person","@id":"https:\/\/2thenew.xyz\/blog\/author\/gaurav-sharma\/#author","url":"https:\/\/2thenew.xyz\/blog\/author\/gaurav-sharma\/","name":"Gaurav Sharma","image":{"@type":"ImageObject","@id":"https:\/\/2thenew.xyz\/blog\/alphanum-sort\/#authorImage","url":"https:\/\/newersworld-sf-static.tothenew.net\/prod\/profilePicFolder\/a33fa680-a1a3-4d80-be97-6aaf7ad88e4a_364-Gaurav-Sharma-PROFILEPICTURE.jpeg","width":96,"height":96,"caption":"Gaurav Sharma"}},{"@type":"WebPage","@id":"https:\/\/2thenew.xyz\/blog\/alphanum-sort\/#webpage","url":"https:\/\/2thenew.xyz\/blog\/alphanum-sort\/","name":"Alphanumeric Sorting using Criteria Query (with MySQL database) | TO THE NEW Blog","description":"I am working on a Grails application with MySQL database. I had a use case in which I had to implement alphanumeric sorting using Criteria Query on Grails. By alphanumeric sorting I mean if there is a class Employee with field empId then on doing : [plain] Employee e1 = new Employee(empId:'emp10').save() Employee e2 = new","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/2thenew.xyz\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/2thenew.xyz\/blog\/alphanum-sort\/#breadcrumblist"},"author":{"@id":"https:\/\/2thenew.xyz\/blog\/author\/gaurav-sharma\/#author"},"creator":{"@id":"https:\/\/2thenew.xyz\/blog\/author\/gaurav-sharma\/#author"},"datePublished":"2012-02-02T13:18:06+05:30","dateModified":"2017-09-22T15:32:39+05:30"},{"@type":"WebSite","@id":"https:\/\/2thenew.xyz\/blog\/#website","url":"https:\/\/2thenew.xyz\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/2thenew.xyz\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Alphanumeric Sorting using Criteria Query (with MySQL database) | TO THE NEW Blog","og:description":"I am working on a Grails application with MySQL database. I had a use case in which I had to implement alphanumeric sorting using Criteria Query on Grails. By alphanumeric sorting I mean if there is a class Employee with field empId then on doing : [plain] Employee e1 = new Employee(empId:'emp10').save() Employee e2 = new","og:url":"https:\/\/2thenew.xyz\/blog\/alphanum-sort\/","og:image":"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Alphanumeric Sorting using Criteria Query (with MySQL database) | TO THE NEW Blog","twitter:description":"I am working on a Grails application with MySQL database. I had a use case in which I had to implement alphanumeric sorting using Criteria Query on Grails. By alphanumeric sorting I mean if there is a class Employee with field empId then on doing : [plain] Employee e1 = new Employee(empId:'emp10').save() Employee e2 = new","twitter:image":"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"5051","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":"","og_description":"","og_object_type":"blog","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":"","og_article_tags":"","twitter_use_og":false,"twitter_card":"summary","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-30 08:00:53","updated":"2024-02-29 10:45:24","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.xyz\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.xyz\/blog\/category\/grails\/\" title=\"Grails\">Grails<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tAlphanumeric Sorting using Criteria Query (with MySQL database)\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/2thenew.xyz\/blog"},{"label":"Grails","link":"https:\/\/2thenew.xyz\/blog\/category\/grails\/"},{"label":"Alphanumeric Sorting using Criteria Query (with MySQL database)","link":"https:\/\/2thenew.xyz\/blog\/alphanum-sort\/"}],"_links":{"self":[{"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/posts\/5051","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/users\/39"}],"replies":[{"embeddable":true,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/comments?post=5051"}],"version-history":[{"count":1,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/posts\/5051\/revisions"}],"predecessor-version":[{"id":51924,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/posts\/5051\/revisions\/51924"}],"wp:attachment":[{"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/media?parent=5051"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/categories?post=5051"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/tags?post=5051"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}