filter types

This block is part of the array group and was last modified in core v14.0.3.

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.

filter types v14.0.3

Returns an array of all items matching the selected type

In pins 2
  • Array required
    array

    The array to be filtered.

  • whitelisted fields
    fielddefinitions

    List of fields we only accept in each array item

Out pins 1
  • Array
    array

    Array with all items matching the selected type.

KEEPS only items whose runtime type equals the selected type and drops the rest: strings are value, booleans condition, integral numbers number, non-integral numbers float, and an object containing a path key counts as file, not object. When whitelisted_fields is set and the selected type is object, each kept object is rebuilt with only the whitelisted fields whose value type also matches its declared type.

extract by type

A typical wiring for filter types: with values feeds the given_array pin; the array out pin feeds filter empty.

Studio canvas example for the filter types block: typical wiring for filter types.

Commonly used with

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

  • get fields: feeds into this block. Gets the selected fields from the given object.
  • set fields: this block feeds into it. Generates an array of mutations based on the given filled fields.
  • filter empty: this block feeds into it. Returns an array of all non-empty items. Empty is defined as: null or undefined.
  • slice: this block feeds into it. returns a shallow copy of a portion of an array into a new array object selected from start to end.
  • foreach: this block feeds into it.

Version history

Introduced in v14.0.3.


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