What is the best way to combine (merge) two JSONObjects?
JSONObjects
JSONObject o1 = { \"one\": \"1\", \"two\": \"2\", \"three\": \"3\" } JSONObject
Try this.. hope it helps
JSONObject result = new JSONObject(); result.putAll(o1); result.putAll(O2);