I have below JSON from API which I don't have control on so changing the format is not possible. I'm struggling to merge this JSON data into single json array.
My requirement is to display Grid Data with multiple series as multi-column something like
DATE | Euler GT2 | Newton | Copernicus GT
Edit: JSON merged would be something like this
"seriesData": [
{
"DATE": "2013-12-10T00:00:00",
"Euler GT2": 10.0,
Newton": 45.0,
Copernicus GT": 100.0,
},
..]
Moreover, the names of column would be dynamic (e.g. DATE, Euler GT2 comes in JSON and not known during design time)
The web API JSON as below -
jQuery21007295361300930381_1406200781162([
{
"seriesName": "Station All Cached0",
"seriesData": [
{
"DATE": "2013-12-10T00:00:00",
"Euler GT2": 10.0
},
{
"DATE": "2013-12-10T01:00:00",
"Euler GT2": 11.0
},
{
"DATE": "2013-12-10T02:00:00",
"Euler GT2": 0.59
}
]
},
{
"seriesName": "Station All Cached1",
"seriesData": [
{
"DATE": "2013-12-10T00:00:00",
"Newton": 45.0
},
{
"DATE": "2013-12-10T01:00:00",
"Newton": 34.0
},
{
"DATE": "2013-12-10T02:00:00",
"Newton": 47.0
}
]
},
{
"seriesName": "Station All Cached2",
"seriesData": [
{
"DATE": "2013-12-10T00:00:00",
"Copernicus GT": 100.0
},
{
"DATE": "2013-12-10T01:00:00",
"Copernicus GT": 0.0
},
{
"DATE": "2013-12-10T02:00:00",
"Copernicus GT": 100.0
}
]
}
])
It can be complex in sense there could be multiple columns per seriesData as well. for example Series 1 contains column 'Date | column1| column2... so on' but it would be easier if I start with 2 columns.