I want to get to get the values from this JSON string: { "item": [ { "value": 142 } , { "value": 200 } ] }
R code:
library(rjson)
item <- list(item=c(value= 142,value=200))
toJSON(item)
And I have:
> toJSON(item)
[1] "{\"item\":{\"value\":142,\"value\":200}}"
How do I get the values from the json string in R?
Discussion of
I()
and what it does is in theRJSONIO
documentation, but that's what you are looking for...