2

i have some arrays and js objects put into a string using JSON.stringify

how can i decode that string again into arrays and objects ?

Thank you .

0

3 Answers 3

7

JSON.parse lets you do that.

You can see plenty of examples everywhere on the Intarwebs.

Even jQuery has a shim for this method (not supported in IE6, maybe 7): jQuery.parseJSON. That is, if you use jQuery.

Sign up to request clarification or add additional context in comments.

Comments

2

That would be:

JSON.parse

cheers Dom

Comments

0

You could use the eval method, or, much better, use JSON.parse. Please check this link for more info: http://www.json.org/js.html

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.