I'm sending a C3 array to a (mySQL) database. Then I want to retrieve it with C3 and restore the array.
The array is width=4, height=1, depth=1.
Array: x(0)="rat", x(1)= "elephant", x(2)= "lion", x(3)= "sloth"
When I send it to the database, I see it gets stored as below. Note the extra brackets (does this mean the animal names are in their own array?).
{"c2array":true,"size":[4,1,1],"data":[[["rat"]],[["elephant"]],[["lion"]],[["sloth"]]]}
Then I use AJAX to retrieve the data. From C3 (and when I use postman), I see the data is retrieved with escape characters.
"{\"c2array\":true,\"size\":[4,1,1],\"data\":[[[\"rat\"]],[[\"elephant\"]],[[\"lion\"]],[[\"sloth\"]]]}"
I'm at a complete loss on how to put the data back in the original array, so it's just like when it was stored. Any help would be very appreciated.