Hi,
I'm using the Visualization API to pull data from a Google
Spreadsheet. I then need to turn the DataTable that is returned into
JSON. I tried using the toJSON() function, but after I do this, I
can't seem to access any members of the JSON object. I don't think
this function works, and I don't really want to use it anyway. I would
prefer to use the labels (column headings) as property names.
I want to be able to create a JSON object with the following format,
but startTime, endTime etc. would change depending on the spreadsheet
that I am reading from. I don't want this to be tied to a specific
spreadsheet or format.
{
"rows": [
{
"startTime": "8:30 AM",
"endTime": "2:00 PM",
"title": "CASE District VI Board Meeting",
"location": "Pershing Place North"
}
{
"startTime": "8:30 AM",
"endTime": "2:00 PM",
"title": "CASE District VI Board Meeting",
"location": "Pershing Place North"
}
]
}
How can I create this from the DataTable?
Thanks.
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.