Possible Duplicate:
how to parse json in javascript
My server is configured to send back JSON data, but it's not really in key/value pairs as I expected.
I'm getting this:
["Value1","Value2","Value3"]
So my question is, is there a standard library people use to parse the above to get only the String values Value1
, Value2
, and Value3
?
Right now, I'm just using a block of code that's doing a replace on the [
, ]
, and "
characters split on ","
. It's pretty clumsy and was looking for something cleaner.