title: Getting double square brackets while retriving data from map
body: <p>I am storing data inside a Map in form of String as key and  JSONArray as Value 
  But while retrieving data i am getting double square brackets for value </p>
  
  <p>This is my program </p>
  
  <pre><code>import java.util.Iterator;
  import java.util.LinkedHashMap;
  import java.util.Map;
  
  import com.google.gson.JsonArray;
  import com.google.gson.JsonObject;
  
  public class Test {
  
      public static void main(String args[]) {
  
          Map&lt;String, JsonArray&gt; datafromdb = new LinkedHashMap&lt;String, JsonArray&gt;();
  
          JsonArray jsonarray = new JsonArray();
          JsonObject pacs_obj = new JsonObject();
          pacs_obj.addProperty("pac_id", "1235");
          jsonarray.add(pacs_obj);
          String new_catid = "1";
  
          if (!datafromdb.containsKey(new_catid)) {
              datafromdb.put(new_catid, new JsonArray());
          }
  
          datafromdb.get(new_catid).add(jsonarray);
  
          Iterator it = datafromdb.entrySet().iterator();
          JsonArray catarr = new JsonArray();
          while (it.hasNext()) {
              Map.Entry pair = (Map.Entry) it.next();
  
              JsonArray array = (JsonArray) pair.getValue();
  
              System.out.println(array);
  
          }
  
      }
  
  }
  </code></pre>
  
  <p>when i run the above program the out put is </p>
  
  <pre><code>[[{"pac_id":"1235"}]]
  </code></pre>
  
  <p>Could you please tell me how to retrieve this issue </p>