I have these arrays
int[] ivrArray = { 1, 0, 0, 0};
int[] agentsArray = { 0, 2, 0, 0 };
int[] abandonedArray = { 0, 0, 3, 0};
int[] canceledArray = { 0, 0, 0, 4};
and I used this dictionary:
Dictionary<string, int[][]> dictionary = new Dictionary<string, int[][]>
{
{"IVR", ivrArray.Select(_ => new[] {_}).ToArray()},
{"Agents", agentsArray.Select(_ => new[] {_}).ToArray()},
{"Abandoned", abandonedArray.Select(_ => new[] {_}).ToArray()},
{ "Cancelled",canceledArray.Select(_ => new[] {_}).ToArray()}
};
the result after changing it to json is:
{
"IVR": [
[1],
[0],
[0],
[0]
],
"Agents": [
[0],
[2],
[0],
[0]
],
"Abandoned": [
[0],
[0],
[3],
[0]
],
"Cancelled": [
[0],
[0],
[0],
[4]
]
}
you can see that each element in the JSON is array like this [[0],[0],[0],[4]]
I need to add another value to each element in that array, so the result will be this:
[[1325376000000,0],[1328054400000,0],[1330560000000,0],[1333238400000,0]]
How can I do that?
These values are static for all the four arrays.