get at index

This block is part of the array group and was last modified in core v10.4.28.

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 (out). 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.

get at index v10.4.28

Returns the element stored at the given zero-based index. An index outside the array, or an element that is null, outputs null.

In pins 2
  • array required
    array

    The array from which to retrieve the item at the specified index.

  • index required
    number

    The index of the item to be retrieved.

Outputs the ELEMENT stored at the given zero-based index on the type-selected output pin (pin id object when no type is chosen); it does NOT search for a value or return an index. An out-of-range index, a missing array, or a null element outputs null.

A typical wiring for get at index: number feeds the number pin; split feeds the array pin; the object out pin feeds custom field.

Studio canvas example for the get at index block: typical wiring for get at index.

Commonly used with

In production blueprints, this block is most often wired together with:

  • number: feeds into this block. Generates a valid number from the filled custom value in the blueprint.
  • cast to number: this block feeds into it. Converts the given value into a number.
  • split: feeds into this block. takes a pattern and divides this string into an ordered list of substrings by searching for the pattern, puts these substrings into an array, and returns the array.
  • array with values: feeds into this block. Creates a new array of given values.
  • random between: feeds into this block. Generates a random number between, including, the given two numbers. This number will be an integer (e.g. 1, 2, 3) without decimals.
  • custom: this block feeds into it. Custom styling.

Version history

Introduced in v10.4.28.


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