Convert javascript string to an array

Posted by dev.e.loper on Stack Overflow See other posts from Stack Overflow or by dev.e.loper
Published on 2010-04-26T00:41:03Z Indexed on 2010/04/26 0:53 UTC
Read the original article Hit count: 394

I'm retrieving an array of objects from a hidden html input field. The string I'm getting is:

"{"id":"1234","name":"john smith","email":"[email protected]"},{"id":"4431","name":"marry doe","email":"[email protected]"}"

Now I need to pass this as an array of objects again. How do I convert this string into array of objects?

© Stack Overflow or respective owner

Related posts about arrays

Related posts about literals