Documentation

length() function

The length() function returns the number of items in an array.

Function type: Miscellaneous

length(arr: [])

Parameters

arr

The array to evaluate.

Examples

people = ["John", "Jane", "Abed"]

length(arr: people)

// Returns 3

New! Cloud or OSS?

InfluxDB OSS 2.0 now generally available!

InfluxDB OSS 2.0 is now generally available and ready for production use. See the InfluxDB OSS 2.0 release notes.

For information about upgrading to InfluxDB OSS 2.0, see: