IacStdFunctions

List Functions

Standard library functions for list manipulation

index

index gets the entry from a list at the specified index.

Inputs

NameTypeDescription
listarray[string] | array[integer] | array[buffer]The list to retrieve an entry from
indexintegerThe index of the entry to retrieve

Output

NameTypeDescription
valuestringThe entry from list at the specified index
output "entry" {
    value = index(['a', 'b', 'c'], 1)
}
// > entry: b

On this page