I am using JSON.parse to parse this JSON string
[{"created_at":"2012-01-24T22:36:21Z","name":"joe","age":42,"updated_at":"2012-01-24T22:36:21Z"}]
However I am simply getting this result as the output:
[object Object]
Which shouldn't be the result. I am using this within the Cappuccino framework. Does anyone know what I am doing wrong here?
[object Object]is what objects display when you calltoStringon them. It looks like you're taking your result and trying to callobj.toString()Also, your JSON is an array with one element in it, so to verify that your result is correct, you can access the name property on the [0] index:
DEMO
Or get rid of the array, since it's not really doing much
DEMO