% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/array_utils.R
\name{json_array_length}
\alias{json_array_length}
\title{Get array length of JSON arrays}
\usage{
json_array_length(x, wrap_scalars = FALSE)
}
\arguments{
\item{x}{A JSON vector.}

\item{wrap_scalars}{Consider scalars as length one array?}
}
\value{
An integer vector of array lengths.
}
\description{
Get array length of JSON arrays
}
\examples{
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)
}
