private JSONObject insertJSONintoJSON(JSONObject newJSON, JSONObject parent)
{
Object[] a = parent.values().toArray();
JSONObject jsonObject2 = (JSONObject) a[1];
Object[] b = jsonObject2.values().toArray();
JSONObject folders = (JSONObject) b[2];
Object[] c = folders.values().toArray();
JSONArray folderss = (JSONArray) c[2];
for (Object objc : folderss)
{
JSONObject tmp = (JSONObject) objc;
Object[] d = tmp.values().toArray();
String name = (String) d[4];
if (name.toUpperCase().equals("EXCHANGE"))
{
tmp = newJSON;
return parent;
}
}
return parent;
}
Hi, I want to return the parent with the new Value(newJSON), but the parent doesn't have it in, tmp doesn't change the value.