I’m wondering if any one knows of a JS function to convert a json array to a javascript array..
How ever the returned json array could be multi dimension or it could be a single dimensional…. so i wanted to find a function that would construct the javascript array to cater to all dimensions?
EDIT: Please don’t suggest a library related function i don’t use them.
Modern browsers are already doing this :
JSON.parse('["foo", ["bar", ["foofoo", "barbar"]]]');https://developer.mozilla.org/En/Using_native_JSON
But you may want something that supports older browsers :
http://api.jquery.com/jQuery.parseJSON/