title: Unable to get all the records from map while converting from <String, Object> to <String, String>
body: <p>I have a variable  value1 of type <code>Map&lt;String,Object&gt;</code> type containing value</p>
  
  <pre><code>value1{assetName=Account, assetInstanceName=Savings, desc=asdasd}
  
  value1{assetName=Service, assetInstanceName=AccountService1, desc=asd}
  </code></pre>
  
  <p>when I am converting it to <code>Map&lt;String,String&gt;</code> type by using the below piece of code I get only last record of value1. How can I get both records?</p>
  
  <pre><code>        Map&lt;String, String&gt; newMap = new HashMap&lt;String, String&gt;();
  
      for (Map.Entry&lt;String, Object&gt; entry : value1.entrySet()) {
  
          try {
  
              newMap.put(entry.getKey(), (String) entry.getValue());
  
          } catch (ClassCastException cce) {
  
          }
  
      }
  </code></pre>