tags:

views:

28

answers:

0

I am using jquery jqplot plugin for displaying graphs.

Using php,i retrieved json data like this:

 for($i = 0; $i < $result_count; $i++)
    {
       $data_array[$i][0] = "some value";       
    }  
 echo  json_encode($data_array);    

Then,i get the data using jquery:

$jquery.ajax({
    type: 'POST',
    url: "server url",
    dataType: "json",
    success: function(data){   

               line.push(data);                

       console.log(line);   
}
});

console log displaying the format like this : [[[6], [4], [3], 2 more...]

How to get the data in the following format:

[[6,1],[4,2],[3,3],[2,4],[1,5]]

Thank You