I want to parse a TEXTAREA, putting each line into a JSON array via jQuery. Any idea how to do this?
Share
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.
Just like this:
So you’ll get JavaScript array object, not JSON string. If you want JSON string you can use jquery-json plugin and then do the following:
And if you want object, not array encoded in JSON do that: