index of

This block is part of the array group and was last modified in core v13.0.8.

Type Selection Required

This block requires you to select the data type you want to work with. You must manually select the type using the type selector modal. To access the modal, click the white button on the block.

Field Selection Required

This block requires field selection (in). You must manually select the fields you want to work with using the field selector modal. To access the modal, click the white button on the block.

index of v13.0.8

Get the index of the given value, -1 if not found.

In pins 1
  • array required
    array
Out pins 1
  • index
    number

    The index of the given value.

Outputs the zero-based index of the FIRST element equal to the comparison pin (named after the selected type, legacy pin id value), or -1 when no element matches. Numbers match across int/float representations, but numeric strings do NOT equal numbers.

A typical wiring for index of: the index out pin feeds cast to value.

Studio canvas example for the index of block: typical wiring for index of.

Version history

Introduced in v13.0.8.


Back to array Return to the main group to view all sub-groups Back to array Return to the group to view all blocks within this group