79222736

Date: 2024-11-25 11:04:33
Score: 0.5
Natty:
Report link

I usually use ConfigObject for this. It does deep merge along other goodies.

a= [
    "a" : "1",
    "animals" : ["cat" : "blue"]
]

b= [
    "b" : 2,
    "animals" : ["dog" : "red"]
]

result = (HashMap)new ConfigObject(a).merge(((ConfigObject)b))
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: jonhattan