Skip to main content

Index In List

Uncontrolled node

Overview

The Index In List node searches for a specific value in a list and returns:

  • A boolean indicating if the value was found (true or false)
  • The index of the first occurrence of the value (or -1 if not found)

This node is helpful for conditional logic, validation, or locating where a value appears in a dataset.

Inputs

InputTypeDescriptionDefault
ListListThe list to search through-
ValueAnyThe value to find in the list-

Outputs

OutputTypeDescription
FoundBooleantrue if the value exists in the list, otherwise false
IndexNumberThe position of the first occurrence of the value, or -1 if not found

Panel Controls

No additional configuration is required. This node uses standard equality checks to compare list items to the input value.

Example: Value Found

List:

["apple", "banana", "cherry"]

Value:

"banana"

Output:

  • Found: true
  • Index: 1

Example: Value Not Found

Value:

"grape"

Output:

  • Found: false
  • Index: -1
Tip

This node only returns the index of the first match. If the value appears multiple times, only the first one is returned.