Здравствуйте.
Есть JSON вида
{
"FailedCount":[{"FailedCount_MEAS_VALUE":1,"DATETIME_CURRENT":"12:01"},
{"FailedCount_MEAS_VALUE":0,"DATETIME_CURRENT":"12:02"},
{"FailedCount_MEAS_VALUE":3,"DATETIME_CURRENT":"12:03"},
{"FailedCount_MEAS_VALUE":4,"DATETIME_CURRENT":"12:04"}],
"SucceededCount":[{"SucceededCount_MEAS_VALUE":110},
{"SucceededCount_MEAS_VALUE":120},
{"SucceededCount_MEAS_VALUE":130},
{"SucceededCount_MEAS_VALUE":140}]
}
каким образом в него правильно добавить новую "серию" AllCount, элементы являются суммой FailedCount.FailedCount_MEAS_VALUE+SucceededCount.SucceededCount_MEAS_VALUE
"AllCount":[{"AllCount_MEAS_VALUE":121},
{"AllCount_MEAS_VALUE":120},
{"AllCount_MEAS_VALUE":133},
{"AllCount_MEAS_VALUE":144}]
чтобы в итоге получился следующий результат
{
"FailedCount":[{"FailedCount_MEAS_VALUE":1,"DATETIME_CURRENT":"12:01"},
{"FailedCount_MEAS_VALUE":0,"DATETIME_CURRENT":"12:02"},
{"FailedCount_MEAS_VALUE":3,"DATETIME_CURRENT":"12:03"},
{"FailedCount_MEAS_VALUE":4,"DATETIME_CURRENT":"12:04"}],
"SucceededCount":[{"SucceededCount_MEAS_VALUE":110},
{"SucceededCount_MEAS_VALUE":120},
{"SucceededCount_MEAS_VALUE":130},
{"SucceededCount_MEAS_VALUE":140}],
"AllCount":[{"AllCount_MEAS_VALUE":121},
{"AllCount_MEAS_VALUE":120},
{"AllCount_MEAS_VALUE":133},
{"AllCount_MEAS_VALUE":144}]
}