docs-v2/content/influxdb/cloud/reference/flux/stdlib/built-in/misc/length.md

464 B

title description menu weight
length() function The `length()` function returns the number of items in an array.
influxdb_cloud_ref
name parent
length built-in-misc
401

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