I've got an array below via print_r, however I need to only use part of this so I can use it in flot charts.
Array ( [success] => 1 [timestamp] => 1383824357 [data] => Array ( [0] => Array ( [label] => customer1 [SUM(value)] => 12345) [1] => Array ( [label] => customer2 [SUM(value)] => 67890) [2] => Array ( [label] => customer3 [SUM(value)] => 11223 ) [3] => Array ( [label] => customer4 [SUM(value)] => 33445 ) ) )
The format that flot charts want is like so (with the above data used):
[
{ label: "customer1", data: 12345},
{ label: "customer2", data: 67890},
{ label: "customer3", data: 11223},
{ label: "customer4", data: 34455}
];
Does anyone know how I can go about accessing the data as above?