0
我正在尋找使用Kendo UI渲染折線圖。 http://demos.telerik.com/kendo-ui/line-charts/remote-data-binding在Kendo UI中使用遠程數據配置折線圖
它期望JSON數據被直接像的格式(從它們的例子)的陣列:
[
{
"date": "12/30/2011",
"close": 405,
"volume": 6414369,
"open": 403.51,
"high": 406.28,
"low": 403.49,
"symbol": "2. AAPL"
},
{
"date": "11/30/2011",
"close": 382.2,
"volume": 14464710,
"open": 381.29,
"high": 382.276,
"low": 378.3,
"symbol": "2. AAPL"
}
]
然而,我有,在以下的格式返回數據的URL。請注意額外的對象「居」,其中有數組開頭:
{
"ranks": [
{
"id": 2,
"rank": 3,
"rankdate": "2015-05-17T00:00:00+0000",
"student": {
"id": 203,
"name": "Student1",
"currentRank": 3,
"LastVerified": "2015-05-17T22:30:00+0000"
}
},
{
"id": 1,
"rank": 4,
"rankdate": "2015-05-16T00:00:00+0000",
"student": {
"id": 203,
"name": "Student1",
"currentRank": 3,
"LastVerified": "2015-05-17T22:30:00+0000"
}
}
]
}
我想知道是否有辦法有數據源裏面看「行列」的陣列,而不是直接想到它。