171
rated 0 times
[
174]
[
3]
/ answers: 1 / hits: 18240
/ 11 Years ago, thu, october 17, 2013, 12:00:00
I have an ajax request that returns a list of values like this:
[-5, 5, 5], [-6, 15, 15], [7, 13, 12]
I need it to be a javascript array with numbers:
[[-5, 5, 5], [-6, 15, 15], [7, 13, 12]]
I tried to replace the '[' and ']' for a '|' and then split by '|' and foreach item split by ',' and add them to an array, but this is not elegant at all.
Do you guys have any suggestions?
More From » arrays