Reputation: 91
I have a sql query which creates a pivot table. Now I've have executed this query in PHP using 'multiquery' and have converted it into JSON using 'json_encode'. The JSON data is consists of around 25million records and the format of each record is
{
timestamp: .....;
value 1: .....;
value 2: .....;
value 3: .....;
value 4: .....;
..
..
..
value n: .....;
}
Now I need to create a chart from this. How should I convert the JSON data into dynamic array so as to create a chart. I'm using dygraphs library.
Upvotes: 0
Views: 541
Reputation: 1
You can convert JSON string to array by using json_decode()
function
$newArray = json_decode($json_string, TRUE);
Upvotes: 0