Description Usage Arguments Value See Also Examples
Returns the element of a JSON array by giving the desired index.
1 | jsonElemAt(json, index, toJSON = FALSE, fromJSON = FALSE)
|
json |
json string |
index |
integer |
toJSON |
logical, whether to apply |
fromJSON |
logical, whether to apply |
A JSON string if fromJSON=FALSE
, a R object if fromJSON=TRUE
.
jsonElemsAt
, jsonElemAt_ifNumber
, jsonAccess
1 2 3 4 5 6 | json <- "[0,1,\"hello\",null,\"bird\"]"
jsonElemAt(json, 2)
jsonElemAt(json, 3)
jsonElemAt(json, 10) == "null"
jsonElemsAt(json, 1:4) %>% jsonElemAt(3)
jsonElemAt("{\"a\":{\"b\":8}}", 0) == "null"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.