Hello,
I have a question to Arrays in C3:
I made a function to save some Userstats in a mysql database.
To load these data, I just make an AJAX request and the answer will be a C3-Array like this:
{"c2array":true,"size":[10,1,1],"data":[[[7]],[[6]],[[7]],[[3]],[[7]],[[0]],[[7]],[[0]],[[6]],[[0]]]}
So I do something like this:
"myLoadArray = load from JSON string AJAX.lastdata"
Then I can access all the data from the "myLoadArray".
This works fine.
But now my problem:
I also save complete arrays...
For example in array.at(9) I stored a full array, then it would look like this:
{"c2array":true,"size":[10,1,1],"data":[[[7]],[[6]],[[7]],[[3]],[[7]],[[0]],[[7]],[[0]],[[6]],[["{"c2array":true,"size":[10,1,1],"data":[[[7]],[[6]],[[7]],[[3]],[[7]],[[0]],[[7]],[[0]],[[6]],[[0]]]}"]]]}
And this doesn't work. I pretty sure the problem are the quotation marks.
But how can I fix that? Working with "'" + """ like this:
{'c2array':true,'size':[10,1,1],'data':[[[7]],[[6]],[[7]],[[3]],[[7]],[[0]],[[7]],[[0]],[[6]],[['{"c2array":true,"size":[10,1,1],"data":[[[7]],[[6]],[[7]],[[3]],[[7]],[[0]],[[7]],[[0]],[[6]],[[0]]]}']]]}
also doesn't work...
Thanks for your help!