I have a JSON string that I would like to convert to a javascript array. How can I do this?
I was under the impression thot JQuery could do this
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
in general you can do
JSON.parse(jsonString). Most browsers support this.with jquery, if you tell
$.ajax()that the response type is json, it will do this for you. See the ‘dataType’ option here http://api.jquery.com/jQuery.ajax/