title: Java : Json with duplicate keys to map using Jackson
body: <p>I have a json file with same key but different values as follows,</p>
  
  <pre><code>{
      "domains" : {
          "A" : {
              "name" : "a",
              "type" : "a1"
          },
          "B"  :{
              "name" : "r",
              "type" : "g1"
           },
          "A" : {
             "name" : "b",
             "type" : "b1"
          }
      }
  }
  </code></pre>
  
  <p>which is coming from <strong>external system</strong>.
  How to convert the <strong>json to java map</strong> object and access the different values of the key: A</p>
  
  <p>I am using something like below,</p>
  
  <pre><code>map = mapper.readValue(json, new TypeReference&lt;HashMap&lt;String,String&gt;&gt;(){});
  </code></pre>
  
  <p>which returns a map with unique keys. But I need a map object to hold all the data from json file.</p>
  
  <p>Anyway to achieve this?</p>