import org.json.JSONArray;
import org.json.JSONObject;
    HashMap<String,String> testAttMap = new HashMap<String,String>();
        HashMap<String,String> jsonMap = new HashMap<String,String>();
        jsonMap.put("containerType", "Drive");
        testAttMap.put("idNbr", "11111111111");
        testAttMap.put("name", "ATTTT");
        jsonMap.put("testAtts", new JSONObject(testAttMap).toString());
        System.out.println(new JSONArray().put(jsonMap));   
Expecting :
[{"containerType":"Drive","testAtts":"{"idNbr":"11111111111","name":"ATTTT"}"}]
Actual Result :
[{"containerType":"Drive","testAtts":"{\"idNbr\":\"11111111111\",\"name\":\"ATTTT\"}"}]
Can anyone suggest a fix?
 
     
    