This node retrieves an item from a list at a certain index (position). Position [index] starts from 0. Thus, an index of 1 gets the second value.

Node Inputs

  1. Type: The type of list you want to retrieve an item from
    • Type: Dropdown
  2. List: The list from which you want to retrieve an item
    • Type: List<T> (based on the type of list you choose)
  3. Index: The index of the item you want to retrieve
    • Type: Integer

Node Outputs

  1. Output: The item at the position (index)
    • Type: Text (based on the type of list you choose)
    • Example usage: {{get_list_item_0.output}}

Considerations

  • Index value should always be non-negative.

Example

The below example shows a pipeline that takes a list of fruits and retrieves the item at index 1 (the second item in the list as lists start with index 0).

  1. Text Node: Contains the following text: apples,oranges,peaches
  2. Split Text Node: Splits the text on the comma delimiter into a list
    • Text for splitting: {{text_0.text}}
    • Delimiter: Character(s)
    • Character: ,
  3. Get List Item Node: Retrieves the item at index 1
    • List: {{split_text_0.processed_text}}
    • Index: 1
  4. Output: The item at index 1
    • Output: {{get_list_item_0.output}}