I have two JSON object from org.json
: the first one is
json1 = {a: {b : {c: val1} } }
and the second is
json2= {a {b: {c2: val2 } } }
is there any way to merge this two object to have one object like this:
result = {a: { b: {c: val1, c2: val2 } } }
I don't have any idea about the keys of the two objects, so i need to loop dynamically over these objects and do the merge. Is there any built in method to do this trick. Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…