0
我從數據庫中的JSON數據來動態地,見下圖:如何從JSON中提取創建一個新的JSON文件
[["15","0.027","0.137","0.353","0.044","0.111","0.024","2013-07-30 17:45:06"],["17","0.027","0.137","0.353","0.044","0.111","0.024","2013-07-30 17:50:14"],["19","0.017","0.137","0.353","0.044","0.111","0.024","2013-07-30 17:55:35"],["21","0.017","0.137","0.353","0.044","0.111","0.024","2013-07-30 18:00:34"],["23","0.017","0.137","0.353","0.044","0.111","0.024","2013-07-30 18:05:10"],["25","0.017","0.137","0.353","0.044","0.111","0.024","2013-07-30 18:10:07"] and so on..
所以結構如下[time1, time2, time3, time4, time5, time5, time7, TimeStamp]
我需要實現什麼在結束了7個新JSONs具有結構如下:
json1 = [time1,TimeStamp]
json2 = [time2,TimeStamp]
json3 = [time3,TimeStamp]
json4 = [time4,TimeStamp]
and so on..
我需要這個落實到jQPLot 任何人都可以幫助嗎?謝謝
術語說明,您所擁有的都不是JSON。這只是JS數組。 –
它是來自php文件的json_encode($ data)。你能幫忙嗎?非常感謝 – medzi
Rory的意思是JSON格式不同,它由{}和更多的規則所包圍。你有什麼是一個JS數組。如果你想得到正確的答案,最好是正確地使用術語。即使他們可能知道答案,很多人也不會明白你的意思。解決方案可能是Scorchio在這裏的答案。 – Chilpol