In SQLite, the json_array_length()
function returns the number of elements in a given JSON array.
The array is provided as an argument. If the array is embedded within a larger JSON document, we can use an optional second argument to specify the path to the array.
If the value is not an array, the function returns 0
.