I am trying to parse data from Google Analytics for a reporting tool on a website and can bring back the data without a problem. I am then using that data to generate a FusionChart object:
The data I am using in the 'data' element is a label/value pair combination and if I explicity enter the following:
[{ "label":"1","value":"34" },"label":"2","value":"72" },...]
the graph works fine (shows labels etc).
However, the string I am using is being parsed as:
[{ "label":["1"],"value":["34"] },"label":["2"],"value":["72"] },...]
(Note the additional square brackets around the value elements of the keys)
Having these square brackets is causing no end of issues so anyone got an idea how to parse the data without these? I have trying string replace on the elmments but no luck!
Thanks