nth

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  Expression Functions > List Functions >

nth

Returns the specified item from the list. The index is zero-based. Fails if the index is out of bounds.

 

Signature

nth(list:list, index:number) -> item

 

Parameters

Name

Type

Description

list

list

Specifies the input list.

index

number

Specifies the zero-based index of the item to return.

 

Examples

The following expression returns "b":

 

nth(list('a', 'b', 'c'), 1)


© 2019 Altova GmbH