That works. Thanks!
My sense of style is happy:)
On Jan 4, 1:39 am, VizBoy <[email protected]> wrote:
> Hi,
> Did you try:
> eval('(' + jsonString + ')')
> ?
> These parentheses help eval understand that it is an object.
>
> Let me know if it works. If not, please specify exactly what doesn't work
> for you, and also give an example of the json string.
>
> Regards,
> VIzBoy.
>
>
>
> On Fri, Jan 2, 2009 at 8:51 PM, Cesium <[email protected]> wrote:
>
> > I've got a string that contains JSON formatted data. Call it
> > jsonString.
> > I'm trying to construct a DataTable using that string.
> > So far I've only had success with:
>
> > var src='var foo='+jsonString+';';
> > eval(src);
> > var remoteData = new google.visualization.DataTable(foo, 0.5);
>
> > Oh this feels itchy.
>
> > I've had no luck passing in jsonString directly in the constructor.
> > Is there a 'better' way?
>
> > Thanks,
> > David- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---