{"id":26463,"date":"2022-12-17T22:54:30","date_gmt":"2022-12-17T17:24:30","guid":{"rendered":"https:\/\/jassweb.com\/solved\/solved-sorting-treemap-alphabetically\/"},"modified":"2022-12-17T22:54:30","modified_gmt":"2022-12-17T17:24:30","slug":"solved-sorting-treemap-alphabetically","status":"publish","type":"post","link":"https:\/\/jassweb.com\/solved\/solved-sorting-treemap-alphabetically\/","title":{"rendered":"[Solved] Sorting TreeMap alphabetically"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div id=\"answer-42396691\" class=\"answer js-answer accepted-answer js-accepted-answer\" data-answerid=\"42396691\" data-parentid=\"41874651\" data-score=\"1\" data-position-on-page=\"1\" data-highest-scored=\"1\" data-question-has-accepted-highest-score=\"1\" itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n<div class=\"post-layout\">\n<div class=\"votecell post-layout--left\"><\/div>\n<div class=\"answercell post-layout--right\">\n<div class=\"s-prose js-post-body\" itemprop=\"text\">\n<p>Eric Berry wrote a handy class that compares Strings by human values instead of traditional machine values.  Below is a modified version of it along with Object comparator (what I think you are looking for) and its testing class.<\/p>\n<p>An example on how to use the string comparator:<\/p>\n<pre><code>Map&lt;String,String&gt; humanSortedMap = new TreeMap&lt;&gt;(new AlphaNumericStringComparator());\n<\/code><\/pre>\n<p>An example on how to use the object comparator, but this time using a List instead of a TreeMap:<\/p>\n<pre><code>Collections.sort(humanSortedList, new AlphaNumericObjectComparator&lt;QuartzJobWrapper&gt;()\n            {\n                @Override\n                public int compare(QuartzJobWrapper t1, QuartzJobWrapper t2)\n                {\n                    return compareStrings(t1.getName(), t2.getName());\n                }\n            });\n<\/code><\/pre>\n<p>AlphaNumericStringComparator Source:<\/p>\n<pre><code>  \/*\n * Copyright (c) 2007 Eric Berry &lt;elberry@gmail.com&gt;\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and\/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\/\n\nimport java.text.DecimalFormatSymbols;\nimport java.util.Comparator;\nimport java.util.Locale;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n\nimport org.apache.commons.lang3.StringUtils;\n\n\/**\n * Compares Strings by human values instead of traditional machine values.\n * \n * @author elberry\n * @modified Tristan Everitt\n *\/\npublic class AlphaNumericStringComparator implements Comparator&lt;String&gt;\n{\n\n    private Pattern alphaNumChunkPattern;\n\n    public AlphaNumericStringComparator()\n    {\n        this(Locale.getDefault());\n    }\n\n    public AlphaNumericStringComparator(Locale locale)\n    {\n        DecimalFormatSymbols dfs = new DecimalFormatSymbols(locale);\n        char localeDecimalSeparator = dfs.getDecimalSeparator();\n        \/\/ alphaNumChunkPatter initialized here to get correct decimal separator for locale.\n        alphaNumChunkPattern = Pattern.compile(\"(\\\\d+\\\\\" + localeDecimalSeparator + \"\\\\d+)|(\\\\d+)|(\\\\D+)\");\n    }\n\n    @Override\n    public int compare(String s1, String s2)\n    {\n        int compareValue = 0;\n        Matcher s1ChunkMatcher = alphaNumChunkPattern.matcher(s1);\n        Matcher s2ChunkMatcher = alphaNumChunkPattern.matcher(s2);\n        String s1ChunkValue = null;\n        String s2ChunkValue = null;\n\n        while (s1ChunkMatcher.find() &amp;&amp; s2ChunkMatcher.find() &amp;&amp; compareValue == 0)\n        {\n            s1ChunkValue = s1ChunkMatcher.group();\n            s2ChunkValue = s2ChunkMatcher.group();\n\n            \/\/ teveritt - Remove white space and make lower case to neutralise it\n            s1ChunkValue = s1ChunkValue.replaceAll(\"\\\\s+\", \"\");\n            s2ChunkValue = s2ChunkValue.replaceAll(\"\\\\s+\", \"\");\n            s1ChunkValue = StringUtils.lowerCase(s1ChunkValue);\n            s2ChunkValue = StringUtils.lowerCase(s2ChunkValue);\n\n            try\n            {\n                \/\/ compare double values - ints get converted to doubles. Eg. 100 = 100.0\n                Double s1Double = Double.valueOf(s1ChunkValue);\n                Double s2Double = Double.valueOf(s2ChunkValue);\n                compareValue = s1Double.compareTo(s2Double);\n            }\n            catch (NumberFormatException e)\n            {\n                \/\/ not a number, use string comparison.\n                compareValue = s1ChunkValue.compareTo(s2ChunkValue);\n            }\n            \/\/ if they are equal thus far, but one has more left, it should come after the one that doesn't.\n            if (compareValue == 0)\n            {\n                if (s1ChunkMatcher.hitEnd() &amp;&amp; !s2ChunkMatcher.hitEnd())\n                {\n                    compareValue = -1;\n                }\n                else if (!s1ChunkMatcher.hitEnd() &amp;&amp; s2ChunkMatcher.hitEnd())\n                {\n                    compareValue = 1;\n                }\n            }\n        }\n        return compareValue;\n    }\n}\n<\/code><\/pre>\n<p>AlphaNumericObjectComparator Source:<\/p>\n<pre><code>\/**\n * Compares Objects by human values instead of traditional machine values.\n * \n * @modified Tristan Everitt\n *\/\npublic class AlphaNumericObjectComparator&lt;T&gt; implements Comparator&lt;T&gt;\n{\n\n    private AlphaNumericStringComparator stringComparator;\n\n    public AlphaNumericObjectComparator()\n    {\n        this(Locale.getDefault());\n    }\n\n    public AlphaNumericObjectComparator(Locale locale)\n    {\n        this.stringComparator = new AlphaNumericStringComparator(locale);\n    }\n\n    @Override\n    public int compare(T t1, T t2)\n    {\n        return compareStrings(t1.toString(), t2.toString());\n    }\n\n    protected int compareStrings(String s1, String s2)\n    {\n        return stringComparator.compare(s1, s2);\n    }\n}\n<\/code><\/pre>\n<p>AlphaNumericStringComparatorTester Source:<\/p>\n<pre><code>import static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.assertNotEquals;\n\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.Random;\n\nimport org.junit.Test;\n\n\/**\n *\n * @author Tristan Everitt\n *\/\npublic class AlphaNumericStringComparatorTester\n{\n    @Test\n    public void testHumanNaturalSort1()\n    {\n        List&lt;String&gt; randomList = Arrays.asList(\"z1.doc\", \"z10.doc\", \"z100.doc\", \"z101.doc\", \"z102.doc\", \"z11.doc\", \"z12.doc\", \"z13.doc\", \"z14.doc\", \"z15.doc\", \"z16.doc\", \"z17.doc\", \"z18.doc\",\n                \"z19.doc\", \"z2.doc\", \"z20.doc\", \"z3.doc\", \"z4.doc\", \"z5.doc\", \"z6.doc\", \"z7.doc\", \"z8.doc\", \"z9.doc\", \"z1.2.doc\", \"z1.3.doc\");\n        Collections.shuffle(randomList, new Random());\n\n        List&lt;String&gt; expected = Arrays.asList(\"z1.doc\", \"z1.2.doc\", \"z1.3.doc\", \"z2.doc\", \"z3.doc\", \"z4.doc\", \"z5.doc\", \"z6.doc\", \"z7.doc\", \"z8.doc\", \"z9.doc\", \"z10.doc\", \"z11.doc\", \"z12.doc\",\n                \"z13.doc\", \"z14.doc\", \"z15.doc\", \"z16.doc\", \"z17.doc\", \"z18.doc\", \"z19.doc\", \"z20.doc\", \"z100.doc\", \"z101.doc\", \"z102.doc\");\n\n        assertNotEquals(expected, randomList);\n        Collections.sort(randomList, new AlphaNumericStringComparator());\n        assertEquals(expected, randomList);\n    }\n\n    @Test\n    public void testHumanNaturalSort2()\n    {\n        List&lt;String&gt; randomList = Arrays.asList(\"z1.doc\", \"z10.doc\", \"z100.doc\", \"z101.doc\", \"z102.doc\", \"z11.doc\", \"z12.doc\", \"z13.doc\", \"z14.doc\", \"z15.doc\", \"z16.doc\", \"z17.doc\", \"z18.doc\",\n                \"z19.doc\", \"z2.doc\", \"z20.doc\", \"z3.doc\", \"z4.doc\", \"z5.doc\", \"z6.doc\", \"z7.doc\", \"z8.doc\", \"z9.doc\", \"z1.2.doc\", \"z1.3.doc\");\n        Collections.shuffle(randomList, new Random());\n\n        List&lt;String&gt; expected = Arrays.asList(\"z1.doc\", \"z1.2.doc\", \"z1.3.doc\", \"z2.doc\", \"z3.doc\", \"z4.doc\", \"z5.doc\", \"z6.doc\", \"z7.doc\", \"z8.doc\", \"z9.doc\", \"z10.doc\", \"z11.doc\", \"z12.doc\",\n                \"z13.doc\", \"z14.doc\", \"z15.doc\", \"z16.doc\", \"z17.doc\", \"z18.doc\", \"z19.doc\", \"z20.doc\", \"z100.doc\", \"z101.doc\", \"z102.doc\");\n\n        assertNotEquals(expected, randomList);\n        Collections.sort(randomList, new AlphaNumericStringComparator());\n        assertEquals(expected, randomList);\n    }\n\n    @Test\n    public void testHumanNaturalSort3()\n    {\n        List&lt;String&gt; randomList = Arrays.asList(\"yr1\", \"yr10\", \"yr11\", \"yr12\", \"yr13\", \"yr2\", \"yr 3\", \"yr 3.4\", \"yr 4\", \"yr5\", \"yr6\", \"yr7\", \"yr8\", \"yr 9\");\n        Collections.shuffle(randomList, new Random());\n\n        List&lt;String&gt; expected = Arrays.asList(\"yr1\", \"yr2\", \"yr 3\", \"yr 3.4\", \"yr 4\", \"yr5\", \"yr6\", \"yr7\", \"yr8\", \"yr 9\", \"yr10\", \"yr11\", \"yr12\", \"yr13\");\n\n        assertNotEquals(expected, randomList);\n        Collections.sort(randomList, new AlphaNumericStringComparator());\n        assertEquals(expected, randomList);\n    }\n\n    @Test\n    public void testHumanNaturalSort4()\n    {\n        List&lt;String&gt; randomList = Arrays.asList(\"1-2\", \"1-02\", \"1-20\", \"10-20\", \"fred\", \"jane\", \"pic01\", \"pic2\", \"pic02\", \"pic02a\", \"pic3\", \"pic4\", \"pic 4 else\", \"pic 5\", \"pic05\", \"pic 5\",\n                \"pic 5 something\", \"pic 6\", \"pic   7\", \"pic100\", \"pic100a\", \"pic120\", \"pic121\", \"pic02000\", \"tom\", \"x2-g8\", \"x2-y7\", \"x2-y08\", \"x8-y8\");\n        Collections.shuffle(randomList, new Random());\n\n        List&lt;String&gt; expected = Arrays.asList(\"1-2\", \"1-02\", \"1-20\", \"10-20\", \"fred\", \"jane\", \"pic01\", \"pic02\", \"pic2\", \"pic02a\", \"pic3\", \"pic4\", \"pic 4 else\", \"pic 5\", \"pic05\", \"pic 5\",\n                \"pic 5 something\", \"pic 6\", \"pic   7\", \"pic100\", \"pic100a\", \"pic120\", \"pic121\", \"pic02000\", \"tom\", \"x2-g8\", \"x2-y7\", \"x2-y08\", \"x8-y8\");\n\n        assertNotEquals(expected, randomList);\n        Collections.sort(randomList, new AlphaNumericStringComparator());\n        assertEquals(expected, randomList);\n    }\n\n}\n<\/code><\/pre>\n<\/p><\/div>\n<div class=\"mt24\"><\/div>\n<\/div>\n<p>            <span class=\"d-none\" itemprop=\"commentCount\"><\/span> <\/p><\/div>\n<\/div>\n<p>[ad_2]<\/p>\n<p>solved Sorting TreeMap alphabetically <\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] Eric Berry wrote a handy class that compares Strings by human values instead of traditional machine values. Below is a modified version of it along with Object comparator (what I think you are looking for) and its testing class. An example on how to use the string comparator: Map&lt;String,String&gt; humanSortedMap = new TreeMap&lt;&gt;(new AlphaNumericStringComparator()); &#8230; <a title=\"[Solved] Sorting TreeMap alphabetically\" class=\"read-more\" href=\"https:\/\/jassweb.com\/solved\/solved-sorting-treemap-alphabetically\/\" aria-label=\"More on [Solved] Sorting TreeMap alphabetically\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[320],"tags":[448,323,561,4990],"class_list":["post-26463","post","type-post","status-publish","format-standard","hentry","category-solved","tag-alphabetical","tag-java","tag-sorting","tag-treemap"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[Solved] Sorting TreeMap alphabetically - JassWeb<\/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:\/\/jassweb.com\/solved\/solved-sorting-treemap-alphabetically\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Solved] Sorting TreeMap alphabetically - JassWeb\" \/>\n<meta property=\"og:description\" content=\"[ad_1] Eric Berry wrote a handy class that compares Strings by human values instead of traditional machine values. Below is a modified version of it along with Object comparator (what I think you are looking for) and its testing class. An example on how to use the string comparator: Map&lt;String,String&gt; humanSortedMap = new TreeMap&lt;&gt;(new AlphaNumericStringComparator()); ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jassweb.com\/solved\/solved-sorting-treemap-alphabetically\/\" \/>\n<meta property=\"og:site_name\" content=\"JassWeb\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-17T17:24:30+00:00\" \/>\n<meta name=\"author\" content=\"Kirat\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kirat\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-sorting-treemap-alphabetically\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-sorting-treemap-alphabetically\/\"},\"author\":{\"name\":\"Kirat\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\"},\"headline\":\"[Solved] Sorting TreeMap alphabetically\",\"datePublished\":\"2022-12-17T17:24:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-sorting-treemap-alphabetically\/\"},\"wordCount\":83,\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"keywords\":[\"alphabetical\",\"java\",\"sorting\",\"treemap\"],\"articleSection\":[\"Solved\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-sorting-treemap-alphabetically\/\",\"url\":\"https:\/\/jassweb.com\/solved\/solved-sorting-treemap-alphabetically\/\",\"name\":\"[Solved] Sorting TreeMap alphabetically - JassWeb\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#website\"},\"datePublished\":\"2022-12-17T17:24:30+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-sorting-treemap-alphabetically\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/jassweb.com\/solved\/solved-sorting-treemap-alphabetically\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-sorting-treemap-alphabetically\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/jassweb.com\/solved\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[Solved] Sorting TreeMap alphabetically\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/jassweb.com\/solved\/#website\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"name\":\"JassWeb\",\"description\":\"Build High-quality Websites\",\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/jassweb.com\/solved\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\",\"name\":\"Jass Web\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"contentUrl\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"width\":693,\"height\":132,\"caption\":\"Jass Web\"},\"image\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\",\"name\":\"Kirat\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750\",\"contentUrl\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750\",\"caption\":\"Kirat\"},\"sameAs\":[\"http:\/\/jassweb.com\"],\"url\":\"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[Solved] Sorting TreeMap alphabetically - JassWeb","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:\/\/jassweb.com\/solved\/solved-sorting-treemap-alphabetically\/","og_locale":"en_US","og_type":"article","og_title":"[Solved] Sorting TreeMap alphabetically - JassWeb","og_description":"[ad_1] Eric Berry wrote a handy class that compares Strings by human values instead of traditional machine values. Below is a modified version of it along with Object comparator (what I think you are looking for) and its testing class. An example on how to use the string comparator: Map&lt;String,String&gt; humanSortedMap = new TreeMap&lt;&gt;(new AlphaNumericStringComparator()); ... Read more","og_url":"https:\/\/jassweb.com\/solved\/solved-sorting-treemap-alphabetically\/","og_site_name":"JassWeb","article_published_time":"2022-12-17T17:24:30+00:00","author":"Kirat","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kirat","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jassweb.com\/solved\/solved-sorting-treemap-alphabetically\/#article","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/solved-sorting-treemap-alphabetically\/"},"author":{"name":"Kirat","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31"},"headline":"[Solved] Sorting TreeMap alphabetically","datePublished":"2022-12-17T17:24:30+00:00","mainEntityOfPage":{"@id":"https:\/\/jassweb.com\/solved\/solved-sorting-treemap-alphabetically\/"},"wordCount":83,"publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"keywords":["alphabetical","java","sorting","treemap"],"articleSection":["Solved"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/jassweb.com\/solved\/solved-sorting-treemap-alphabetically\/","url":"https:\/\/jassweb.com\/solved\/solved-sorting-treemap-alphabetically\/","name":"[Solved] Sorting TreeMap alphabetically - JassWeb","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/#website"},"datePublished":"2022-12-17T17:24:30+00:00","breadcrumb":{"@id":"https:\/\/jassweb.com\/solved\/solved-sorting-treemap-alphabetically\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jassweb.com\/solved\/solved-sorting-treemap-alphabetically\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jassweb.com\/solved\/solved-sorting-treemap-alphabetically\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jassweb.com\/solved\/"},{"@type":"ListItem","position":2,"name":"[Solved] Sorting TreeMap alphabetically"}]},{"@type":"WebSite","@id":"https:\/\/jassweb.com\/solved\/#website","url":"https:\/\/jassweb.com\/solved\/","name":"JassWeb","description":"Build High-quality Websites","publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jassweb.com\/solved\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/jassweb.com\/solved\/#organization","name":"Jass Web","url":"https:\/\/jassweb.com\/solved\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/","url":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","contentUrl":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","width":693,"height":132,"caption":"Jass Web"},"image":{"@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31","name":"Kirat","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/","url":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750","contentUrl":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750","caption":"Kirat"},"sameAs":["http:\/\/jassweb.com"],"url":"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/"}]}},"_links":{"self":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/26463","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/comments?post=26463"}],"version-history":[{"count":0,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/26463\/revisions"}],"wp:attachment":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/media?parent=26463"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/categories?post=26463"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/tags?post=26463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}