What is the best way to combine (merge) 2 JSONObjects?
What is the best way to combine (merge) two ?JSONObjects
JSONObject o1 = {
"one": "1",
"two": "2",
"three": "3"
}
JSONObject o2 = {
"four": "4",
"five": "5",
"six": "6"
}
And result of combining and must be o1
o2
JSONObject result = {
"one": "1",
"two": "2",
"three": "3",
"four": "4",
"five": "5",
"six": "6"
}