Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
37
rated 0 times [  42] [ 5]  / answers: 1 / hits: 33151  / 11 Years ago, mon, june 3, 2013, 12:00:00

I am getting a json string from the response. How can I create a data table from that?



e.g.



var jasonString = ..........;

var data = new google.visualization.DataTable(jasonString);

More From » json

 Answers
3

You can use the function arrayToDataTable



var jsonString = ..........; // json string of array
var array = JSON.parse(jsonString);

var dataTableData = google.visualization.arrayToDataTable(array);

// use dataTableData to build dataTable

[#77850] Saturday, June 1, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
dexter

Total Points: 717
Total Questions: 98
Total Answers: 115

Location: Sudan
Member since Thu, May 7, 2020
4 Years ago
;