I'm using the following code to create a JSON string from data extracted from a database:

var jsonData = $.ajax({
        url: "pie_chart.php",
        dataType:"json",
        method:"POST",
        data:$('#myform').serialize(),
        async: false,
        success: function(jsonData)
        {
        console.log(jsonData);
        var data =  google.visualization.arrayToDataTable(jsonData);
0

There are 0 best solutions below