I have variable data having json data as below:
{
"label":["ch1","ch2","ch3"],
"data": [
[-0.001000, -0.562500, 0.001875, 0.002188],
[-0.000998, -0.687500, 0.000937, 0.001875]
]
}
What I want to split above json data using jquery and get them stored in three variables data1, data2, data3 having json data as below:
{
"label":["ch1"],
"data": [
[-0.001000, -0.562500],
[-0.000998, -0.687500]
]
}
and
{
"label":["ch2"],
"data": [
[-0.001000, 0.001875],
[-0.000998, 0.000937]
]
}
and
{
"label":["ch3"],
"data": [
[-0.001000, 0.002188],
[-0.000998, 0.001875]
]
}
Kindly tell me how to split common json data into three different json data as above using jquery?