json_array_length | R Documentation |
Get array length of JSON arrays
json_array_length(x, wrap_scalars = FALSE)
x |
A JSON vector. |
wrap_scalars |
Consider scalars as length one array? |
An integer vector of array lengths.
json_array_length(c(NA, "[1, 2, 3]", "[1, 2]"))
# scalars produce an error unless `wrap_scalars` is `TRUE`
json_array_length(1, wrap_scalars = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.