{"id":1272,"date":"2022-02-26T07:26:27","date_gmt":"2022-02-26T07:26:27","guid":{"rendered":"https:\/\/mdr.foobrdigital.com\/?p=1272"},"modified":"2022-02-26T07:26:27","modified_gmt":"2022-02-26T07:26:27","slug":"hash-map","status":"publish","type":"post","link":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/2022\/02\/26\/hash-map\/","title":{"rendered":"Hash Map"},"content":{"rendered":"\n<p>In this tutorial, we will learn about the Java HashMap class and its various operations with the help of examples.<\/p>\n\n\n\n<p id=\"introduction\">The\u00a0<code>HashMap<\/code>\u00a0class of the Java collections framework provides the functionality of the\u00a0hash table data structure.<\/p>\n\n\n\n<p>It stores elements in&nbsp;<strong>key\/value<\/strong>&nbsp;pairs. Here,&nbsp;<strong>keys<\/strong>&nbsp;are unique identifiers used to associate each&nbsp;<strong>value<\/strong>&nbsp;on a map.<\/p>\n\n\n\n<p>The&nbsp;<code>HashMap<\/code>&nbsp;class implements the&nbsp;<a href=\"https:\/\/www.programiz.com\/java-programming\/map\">Map<\/a>&nbsp;interface.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn.programiz.com\/sites\/tutorial2program\/files\/java-hashmap-implementation.png\" alt=\"Java HashMap implements Map interface\" title=\"Java HashMap Implementation\"\/><figcaption>Java HashMap Implementation<\/figcaption><\/figure>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"create\">Create a HashMap<\/h2>\n\n\n\n<p>In order to create a hash map, we must import the&nbsp;<code>java.util.HashMap<\/code>&nbsp;package first. Once we import the package, here is how we can create hashmaps in Java.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ hashMap creation with 8 capacity and 0.6 load factor\nHashMap&lt;K, V&gt; numbers = new HashMap&lt;&gt;();<\/code><\/pre>\n\n\n\n<p>In the above code, we have created a hashmap named&nbsp;<var>numbers<\/var>. Here,&nbsp;<strong>K<\/strong>&nbsp;represents the key type and&nbsp;<strong>V<\/strong>&nbsp;represents the type of values. For example,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>HashMap&lt;String, Integer&gt; numbers = new HashMap&lt;&gt;();<\/code><\/pre>\n\n\n\n<p>Here, the type of&nbsp;<strong>keys<\/strong>&nbsp;is&nbsp;<code>String<\/code>&nbsp;and the type of&nbsp;<strong>values<\/strong>&nbsp;is&nbsp;<code>Integer<\/code>.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Example 1: Create HashMap in Java<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>import java.util.HashMap;\n\nclass Main {\n  public static void main(String&#91;] args) {\n\n    \/\/ create a hashmap\n    HashMap&lt;String, Integer&gt; languages = new HashMap&lt;&gt;();\n\n    \/\/ add elements to hashmap\n    languages.put(\"Java\", 8);\n    languages.put(\"JavaScript\", 1);\n    languages.put(\"Python\", 3);\n    System.out.println(\"HashMap: \" + languages);\n  }\n}<\/code><\/pre>\n\n\n\n<p><strong>Output<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><samp>HashMap: {Java=8, JavaScript=1, Python=3}<\/samp><\/code><\/pre>\n\n\n\n<p>In the above example, we have created a&nbsp;<code>HashMap<\/code>&nbsp;named&nbsp;<var>languages<\/var>.<\/p>\n\n\n\n<p>Here, we have used the&nbsp;<code>put()<\/code>&nbsp;method to add elements to the hashmap. We will learn more about the&nbsp;<code>put()<\/code>&nbsp;method later in this tutorial.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Basic Operations on Java HashMap<\/h2>\n\n\n\n<p>The&nbsp;<code>HashMap<\/code>&nbsp;class provides various methods to perform different operations on hashmaps. We will look at some commonly used arraylist operations in this tutorial:<\/p>\n\n\n\n<ul><li>Add elements<\/li><li>Access elements<\/li><li>Change elements<\/li><li>Remove elements<\/li><\/ul>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"add\">1. Add elements to a HashMap<\/h3>\n\n\n\n<p>To add a single element to the hashmap, we use the&nbsp;<code>put()<\/code>&nbsp;method of the&nbsp;<code>HashMap<\/code>&nbsp;class. For example,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import java.util.HashMap;\n\nclass Main {\n  public static void main(String&#91;] args) {\n\n    \/\/ create a hashmap\n    HashMap&lt;String, Integer&gt; numbers = new HashMap&lt;&gt;();\n\n    System.out.println(\"Initial HashMap: \" + numbers);\n    \/\/ put() method to add elements\n    numbers.put(\"One\", 1);\n    numbers.put(\"Two\", 2);\n    numbers.put(\"Three\", 3);\n    System.out.println(\"HashMap after put(): \" + numbers);\n  }\n}<\/code><\/pre>\n\n\n\n<p><strong>Output<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><samp>Initial HashMap: {}\nHashMap after put(): {One=1, Two=2, Three=3}<\/samp><\/code><\/pre>\n\n\n\n<p>In the above example, we have created a&nbsp;<code>HashMap<\/code>&nbsp;named&nbsp;<var>numbers<\/var>. Here, we have used the&nbsp;<code>put()<\/code>&nbsp;method to add elements to numbers.<\/p>\n\n\n\n<p>Notice the statement,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>numbers.put(\"One\", 1);<\/code><\/pre>\n\n\n\n<p>Here, we are passing the&nbsp;<code>String<\/code>&nbsp;value&nbsp;<var>One<\/var>&nbsp;as the key and&nbsp;<code>Integer<\/code>&nbsp;value&nbsp;<var>1<\/var>&nbsp;as the value to the&nbsp;<code>put()<\/code>&nbsp;method.<\/p>\n\n\n\n<p><strong>Recommended Readings<\/strong><\/p>\n\n\n\n<ul><li>Java HashMap put()<\/li><li>Java HashMap putAll()<\/li><li>Java HashMap putIfAbsent()<\/li><\/ul>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"access\">2. Access HashMap Elements<\/h3>\n\n\n\n<p>We can use the&nbsp;<code>get()<\/code>&nbsp;method to access the value from the hashmap. For example,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import java.util.HashMap;\n\nclass Main {\n  public static void main(String&#91;] args) {\n\n    HashMap&lt;Integer, String&gt; languages = new HashMap&lt;&gt;();\n    languages.put(1, \"Java\");\n    languages.put(2, \"Python\");\n    languages.put(3, \"JavaScript\");\n    System.out.println(\"HashMap: \" + languages);\n\n    \/\/ get() method to get value\n    String value = languages.get(1);\n    System.out.println(\"Value at index 1: \" + value);\n  }\n}<\/code><\/pre>\n\n\n\n<p><strong>Output<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><samp>HashMap: {1=Java, 2=Python, 3=JavaScript}\nValue at index 1: Java<\/samp><\/code><\/pre>\n\n\n\n<p>In the above example, notice the expression,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>languages.get(1);<\/code><\/pre>\n\n\n\n<p>Here, the&nbsp;<code>get()<\/code>&nbsp;method takes the&nbsp;<strong>key<\/strong>&nbsp;as its argument and returns the corresponding&nbsp;<strong>value<\/strong>&nbsp;associated with the key.<\/p>\n\n\n\n<p>We can also access the&nbsp;<strong>keys<\/strong>,&nbsp;<strong>values<\/strong>, and&nbsp;<strong>key\/value<\/strong>&nbsp;pairs of the hashmap as set views using&nbsp;<code>keySet()<\/code>,&nbsp;<code>values()<\/code>, and&nbsp;<code>entrySet()<\/code>&nbsp;methods respectively. For example,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import java.util.HashMap;\n\nclass Main {\n  public static void main(String&#91;] args) {\n    HashMap&lt;Integer, String&gt; languages = new HashMap&lt;&gt;();\n\n    languages.put(1, \"Java\");\n    languages.put(2, \"Python\");\n    languages.put(3, \"JavaScript\");\n    System.out.println(\"HashMap: \" + languages);\n\n    \/\/ return set view of keys\n    \/\/ using keySet()\n    System.out.println(\"Keys: \" + languages.keySet());\n\n    \/\/ return set view of values\n    \/\/ using values()\n    System.out.println(\"Values: \" + languages.values());\n\n    \/\/ return set view of key\/value pairs\n    \/\/ using entrySet()\n    System.out.println(\"Key\/Value mappings: \" + languages.entrySet());\n  }\n}<\/code><\/pre>\n\n\n\n<p><strong>Output<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><samp>HashMap: {1=Java, 2=Python, 3=JavaScript}\nKeys: &#91;1, 2, 3]\nValues: &#91;Java, Python, JavaScript]\nKey\/Value mappings: &#91;1=Java, 2=Python, 3=JavaScript]<\/samp><\/code><\/pre>\n\n\n\n<p>In the above example, we have created a hashmap named&nbsp;<var>languages<\/var>. Here, we are accessing the&nbsp;<strong>keys<\/strong>,&nbsp;<strong>values<\/strong>, and&nbsp;<strong>key\/value<\/strong>&nbsp;mappings from the hashmap.<\/p>\n\n\n\n<p><strong>Recommended Readings<\/strong><\/p>\n\n\n\n<ul><li>Java HashMap get()<\/li><li>Java Hashmap getOrDefault()<\/li><li>Java HashMap keySet()<\/li><li>Java HashMap values()<\/li><li>Java HashMap entrySet()<\/li><\/ul>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"change\">3. Change HashMap Value<\/h3>\n\n\n\n<p>We can use the&nbsp;<code>replace()<\/code>&nbsp;method to change the value associated with a key in a hashmap. For example,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import java.util.HashMap;\n\nclass Main {\n  public static void main(String&#91;] args) {\n\n    HashMap&lt;Integer, String&gt; languages = new HashMap&lt;&gt;();\n    languages.put(1, \"Java\");\n    languages.put(2, \"Python\");\n    languages.put(3, \"JavaScript\");\n    System.out.println(\"Original HashMap: \" + languages);\n\n    \/\/ change element with key 2\n    languages.replace(2, \"C++\");\n    System.out.println(\"HashMap using replace(): \" + languages);\n  }\n}<\/code><\/pre>\n\n\n\n<p><strong>Output<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><samp>Original HashMap: {1=Java, 2=Python, 3=JavaScript}\nHashMap using replace(): {1=Java, 2=C++, 3=JavaScript}<\/samp><\/code><\/pre>\n\n\n\n<p>In the above example, we have created a hashmap named&nbsp;<var>languages<\/var>. Notice the expression,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>languages.replace(2, \"C++\");<\/code><\/pre>\n\n\n\n<p>Here, we are changing the value referred to by key&nbsp;<strong>2<\/strong>&nbsp;with the new value&nbsp;<var>C++<\/var>.<\/p>\n\n\n\n<p>The&nbsp;<code>HashMap<\/code>&nbsp;class also provides some variations of the&nbsp;<code>replace()<\/code>&nbsp;method. To learn more, visit<\/p>\n\n\n\n<ul><li>Java HashMap replace()<\/li><li>Java HashMap replaceAll()<\/li><\/ul>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"remove\">4. Remove HashMap Elements<\/h3>\n\n\n\n<p>To remove elements from a hashmap, we can use the remove() method. For example,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import java.util.HashMap;\n\nclass Main {\n  public static void main(String&#91;] args) {\n\n    HashMap&lt;Integer, String&gt; languages = new HashMap&lt;&gt;();\n    languages.put(1, \"Java\");\n    languages.put(2, \"Python\");\n    languages.put(3, \"JavaScript\");\n    System.out.println(\"HashMap: \" + languages);\n\n    \/\/ remove element associated with key 2\n    String value = languages.remove(2);\n    System.out.println(\"Removed value: \" + value);\n\n    System.out.println(\"Updated HashMap: \" + languages);\n  }\n}<\/code><\/pre>\n\n\n\n<p><strong>Output<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><samp>HashMap: {1=Java, 2=Python, 3=JavaScript}\nRemoved value: Python\nUpdated HashMap: {1=Java, 3=JavaScript}<\/samp><\/code><\/pre>\n\n\n\n<p>Here, the&nbsp;<code>remove()<\/code>&nbsp;method takes the&nbsp;<strong>key<\/strong>&nbsp;as its parameter. It then returns the&nbsp;<strong>value<\/strong>&nbsp;associated with the&nbsp;<strong>key<\/strong>&nbsp;and removes the&nbsp;<strong>entry<\/strong>.<\/p>\n\n\n\n<p>We can also remove the entry only under certain conditions. For example,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>remove(2, \"C++\");<\/code><\/pre>\n\n\n\n<p>Here, the&nbsp;<code>remove()<\/code>&nbsp;method only removes the&nbsp;<strong>entry<\/strong>&nbsp;if the&nbsp;<strong>key 2<\/strong>&nbsp;is associated with the&nbsp;<strong>value C++<\/strong>. Since&nbsp;<strong>2<\/strong>&nbsp;is not associated with&nbsp;<strong>C++<\/strong>, it doesn&#8217;t remove the entry.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"other-methods\">Other Methods of HashMap<\/h2>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><tbody><tr><th>Method<\/th><th>Description<\/th><\/tr><tr><td><a href=\"https:\/\/www.programiz.com\/java-programming\/library\/hashmap\/clear\">clear()<\/a><\/td><td>removes all mappings from the <code>HashMap<\/code><\/td><\/tr><tr><td><a href=\"https:\/\/www.programiz.com\/java-programming\/library\/hashmap\/compute\">compute()<\/a><\/td><td>computes a new value for the specified key<\/td><\/tr><tr><td><a href=\"https:\/\/www.programiz.com\/java-programming\/library\/hashmap\/computeifabsent\">computeIfAbsent()<\/a><\/td><td>computes value if a mapping for the key is not present<\/td><\/tr><tr><td><a href=\"https:\/\/www.programiz.com\/java-programming\/library\/hashmap\/computeifpresent\">computeIfPresent()<\/a><\/td><td>computes a value for mapping if the key is present<\/td><\/tr><tr><td><a href=\"https:\/\/www.programiz.com\/java-programming\/library\/hashmap\/merge\">merge()<\/a><\/td><td>merges the specified mapping to the <code>HashMap<\/code><\/td><\/tr><tr><td><a href=\"https:\/\/www.programiz.com\/java-programming\/library\/hashmap\/clone\">clone()<\/a><\/td><td>makes the copy of the <code>HashMap<\/code><\/td><\/tr><tr><td><a href=\"https:\/\/www.programiz.com\/java-programming\/library\/hashmap\/containskey\">containsKey()<\/a><\/td><td>checks if the specified key is present in Hashmap<\/td><\/tr><tr><td><a href=\"https:\/\/www.programiz.com\/java-programming\/library\/hashmap\/containsvalue\">containsValue()<\/a><\/td><td>checks if <code>Hashmap<\/code> contains the specified value<\/td><\/tr><tr><td><a href=\"https:\/\/www.programiz.com\/java-programming\/library\/hashmap\/size\">size()<\/a><\/td><td>returns the number of items in <code>HashMap<\/code><\/td><\/tr><tr><td><a href=\"https:\/\/www.programiz.com\/java-programming\/library\/hashmap\/isempty\">isEmpty()<\/a><\/td><td>checks if the <code>Hashmap<\/code> is empty<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"iterate\">Iterate through a HashMap<\/h2>\n\n\n\n<p>To iterate through each entry of the hashmap, we can use\u00a0Java for-each loop. We can iterate through\u00a0<strong>keys only<\/strong>,\u00a0<strong>vales only<\/strong>, and\u00a0<strong>key\/value mapping<\/strong>. For example,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import java.util.HashMap;\nimport java.util.Map.Entry;\n\nclass Main {\n  public static void main(String&#91;] args) {\n\n    \/\/ create a HashMap\n    HashMap&lt;Integer, String&gt; languages = new HashMap&lt;&gt;();\n    languages.put(1, \"Java\");\n    languages.put(2, \"Python\");\n    languages.put(3, \"JavaScript\");\n    System.out.println(\"HashMap: \" + languages);\n\n    \/\/ iterate through keys only\n    System.out.print(\"Keys: \");\n    for (Integer key : languages.keySet()) {\n      System.out.print(key);\n      System.out.print(\", \");\n    }\n\n    \/\/ iterate through values only\n    System.out.print(\"\\nValues: \");\n    for (String value : languages.values()) {\n      System.out.print(value);\n      System.out.print(\", \");\n    }\n    \n    \/\/ iterate through key\/value entries\n    System.out.print(\"\\nEntries: \");\n    for (Entry&lt;Integer, String&gt; entry : languages.entrySet()) {\n      System.out.print(entry);\n      System.out.print(\", \");\n    }\n  }\n}<\/code><\/pre>\n\n\n\n<p><strong>Output<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><samp>HashMap: {1=Java, 2=Python, 3=JavaScript}\nKeys: 1, 2, 3,\nValues: Java, Python, JavaScript,        \nEntries: 1=Java, 2=Python, 3=JavaScript,<\/samp><\/code><\/pre>\n\n\n\n<p>Note that we have used the&nbsp;<code>Map.Entry<\/code>&nbsp;in the above example. It is the nested class of the&nbsp;<code>Map<\/code>&nbsp;interface that returns a view (elements) of the map.<\/p>\n\n\n\n<p>We first need to import the&nbsp;<code>java.util.Map.Entry<\/code>&nbsp;package in order to use this class.<\/p>\n\n\n\n<p>This nested class returns a view (elements) of the map.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"other-maps\">Creating HashMap from Other Maps<\/h2>\n\n\n\n<p>In Java, we can also create a hashmap from other maps. For example,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import java.util.HashMap;\nimport java.util.TreeMap;\n\nclass Main {\n  public static void main(String&#91;] args) {\n\n    \/\/ create a treemap\n    TreeMap&lt;String, Integer&gt; evenNumbers = new TreeMap&lt;&gt;();\n    evenNumbers.put(\"Two\", 2);\n    evenNumbers.put(\"Four\", 4);\n    System.out.println(\"TreeMap: \" + evenNumbers);\n\n    \/\/ create hashmap from the treemap\n    HashMap&lt;String, Integer&gt; numbers = new HashMap&lt;&gt;(evenNumbers);\n    numbers.put(\"Three\", 3);\n    System.out.println(\"HashMap: \" + numbers);\n  }\n}<\/code><\/pre>\n\n\n\n<p><strong>Output<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><samp>TreeMap: {Four=4, Two=2}\nHashMap: {Two=2, Three=3, Four=4}<\/samp><\/code><\/pre>\n\n\n\n<p>In the above example, we have created a&nbsp;<code>TreeMap<\/code>&nbsp;named&nbsp;<code>evenNumbers<\/code>. Notice the expression,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>numbers = new HashMap&lt;&gt;(evenNumbers)<\/code><\/pre>\n\n\n\n<p>Here, we are creating a\u00a0<code>HashMap<\/code>\u00a0named numbers using the\u00a0<code>TreeMap<\/code>. <\/p>\n\n\n\n<p><strong>Note<\/strong>: While creating a hashmap, we can include optional parameters:&nbsp;<strong>capacity<\/strong>&nbsp;and&nbsp;<strong>load factor<\/strong>. For example,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>HashMap&lt;K, V&gt; numbers = new HashMap&lt;&gt;(8, 0.6f);<\/code><\/pre>\n\n\n\n<p>Here,<\/p>\n\n\n\n<ul><li><strong>8<\/strong>&nbsp;(capacity is 8) &#8211; This means it can store 8 entries.<\/li><li><strong>0.6f<\/strong>&nbsp;(load factor is 0.6) &#8211; This means whenever our hash table is filled by 60%, the entries are moved to a new hash table double the size of the original hash table.<\/li><\/ul>\n\n\n\n<p>If the optional parameters not used, then the default&nbsp;<strong>capacity<\/strong>&nbsp;will be&nbsp;<strong>16<\/strong>&nbsp;and the default&nbsp;<strong>load factor<\/strong>&nbsp;will be&nbsp;<strong>0.75<\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we will learn about the Java HashMap class and its various operations with the help of examples. The\u00a0HashMap\u00a0class of the Java collections framework provides the functionality of the\u00a0hash table data structure. It stores elements in&nbsp;key\/value&nbsp;pairs. Here,&nbsp;keys&nbsp;are unique identifiers used to associate each&nbsp;value&nbsp;on a map. The&nbsp;HashMap&nbsp;class implements the&nbsp;Map&nbsp;interface. Create a HashMap In order [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[398],"tags":[],"_links":{"self":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/1272"}],"collection":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/comments?post=1272"}],"version-history":[{"count":0,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/1272\/revisions"}],"wp:attachment":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/media?parent=1272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/categories?post=1272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/tags?post=1272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}