Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.

Join them; it only takes a minute:

Sign up
Join the Stack Overflow community to:
  1. Ask programming questions
  2. Answer and help your peers
  3. Get recognized for your expertise

This question already has an answer here:

Is it possible convert string from JSON.stringify back to Array?

share|improve this question

marked as duplicate by Asad Saeeduddin, rcdmk, m90, Book Of Zeus, likeitlikeit May 19 '13 at 23:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2  
JSON.parse() maybe? – Sam May 19 '13 at 18:27
1  
you can use parseJSON if you are using jquery – karthikr May 19 '13 at 18:28

JSON.parse is your friend and answer :)

//examples:
JSON.parse('{}'); // {}
JSON.parse('true'); // true
JSON.parse('"foo"'); // "foo"
JSON.parse('[1, 5, "false"]'); // [1, 5, "false"]
JSON.parse('null'); // null

MDN JSON.Parse details

share|improve this answer
    
Beware of browser compatibility issues, as noted on this link: developer.mozilla.org/en-US/docs/JavaScript/Reference/…. – rcdmk May 19 '13 at 18:34
    
dude it's talking about ff 3.5, that's like history :) all browsers today support JSON... – Dory Zidon May 19 '13 at 18:43
    
Yep, I know, but IE8- still haunts the web... – rcdmk May 19 '13 at 18:45
1  
it's supported in IE8..caniuse.com/json – Dory Zidon May 19 '13 at 18:49
    
Well... It all dependes on the target audience, but I think it's always better to use a polyfill like json2 in case the browser does not support the native APIs. – rcdmk May 19 '13 at 18:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.