I have 2 Objects Set_1 and Set_2. Inside their, two key are there in both Key_1 and Key_2. Inside those Key_1 and Key_2, there are Sub Keys(Sub Keys are same for Both Objects) which I want to add and want to create a new Object.
"Set_1": {
"Key_1": {
"Sub_Key_1": 110,
"Sub_Key_2": 72,
"Sub_Key_3": 182
},
"Key_2": {
"Sub_Key_1": 110,
"Sub_Key_2": 72,
"Sub_Key_3": 182
}
}
"Set_2": {
"Key_1": {
"Sub_Key_1": 50,
"Sub_Key_2": 72,
"Sub_Key_3": 112
},
"Key_2": {
"Sub_Key_1": 30,
"Sub_Key_2": 40,
"Sub_Key_3": 70
}
}
I want output like below-
"Set_3": {
"Key_1": {
"Sub_Key_1": 160,
"Sub_Key_2": 144,
"Sub_Key_3": 304
},
"Key_2": {
"Sub_Key_1": 140,
"Sub_Key_2": 112,
"Sub_Key_3": 252
}
}