你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

array_length()

Applies to: ✅ Microsoft FabricAzure Data ExplorerAzure MonitorMicrosoft Sentinel

Calculates the number of elements in a dynamic array.

Deprecated aliases: arraylength()

Syntax

array_length(array)

Learn more about syntax conventions.

Parameters

Name Type Required Description
array dynamic ✔️ The array for which to calculate length.

Returns

Returns the number of elements in array, or null if array isn't an array.

Examples

The following example shows the number of elements in the array.

print array_length(dynamic([1, 2, 3, "four"]))

Output

print_0
4