powered by
Get array length of JSON arrays
json_array_length(x, wrap_scalars = FALSE)
A JSON vector.
Consider scalars as length one array?
An integer vector of array lengths.
# NOT RUN { 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) # }
Run the code above in your browser using DataLab