There are two objects that need to be summed up and returned in the same format as the original objects stored in a local file.
The first JSON:
{
"data": [{
"x": "Q1 (J, F, M)",
"y": [100, 500, 0],
"tooltip": "this is tooltip"
}, {
"x": "Q2(A, M, J)",
"y": [300, 100, 100]
}, {
"x": "Q3(J, A, S)",
"y": [351,200,700]
}, {
"x": "Q4 (Q, N, D)",
"y": [54, 0, 879]
}]
}
The second JSON:
{
"data": [{
"x": "Q1 (J, F, M)",
"y": [100, 500, 200],
"tooltip": "this is tooltip"
}, {
"x": "Q2(A, M, J)",
"y": [300, 100, 100]
}, {
"x": "Q3(J, A, S)",
"y": [351,400,555]
}, {
"x": "Q4 (Q, N, D)",
"y": [54, 30, 879]
}]
}
The result will be the sum of both objects:
{
"data": [{
"x": "Q1 (J, F, M)",
"y": [200, 1000, 200],
"tooltip": "this is tooltip"
}, {
"x": "Q2(A, M, J)",
"y": [600, 200, 200]
}, {
"x": "Q3(J, A, S)",
"y": [702,600,1255]
}, {
"x": "Q4 (Q, N, D)",
"y": [108, 30, 1758]
}]
}
Looking for a solution to achieve this functionality.