Vettero

Cast

Cast a variable or value to a specified type.

Type

data-ops.cast
Folderbasic/data-ops
Channels

Any

Pipe

Value

Scope

Any

Cast converts Value to Type and writes the result to the data pipe. Use it when a later block expects a different type than the one you already have (for example text from chat that must become a number).

If the conversion is not possible, the block fails (for example non-numeric text to Number, or text that is not a JSON object to Object).

Configure

SettingDescription
ValueLiteral or variable to convert (required)
TypeString, Number, Boolean, Array, or Object (required)

Handles

HandleRole
In (target)Incoming connection
Out (source)Continues after the value is converted

Pipe schema

The next block reads this on the data pipe (pipe.value). The type matches Type:

TypeResult
StringText
NumberNumber. Empty text becomes 0. Yes/no becomes 1 or 0. Invalid text fails
BooleanYes/no. Text true, 1, yes, and on (any case) count as yes
ArrayList. Already a list is unchanged. Missing becomes []. JSON text that is a list is parsed; other values become a one-item list
ObjectObject. Already a non-list object is unchanged. JSON text must parse to an object or the block fails

Use case

  • Turn collected chat text into a number before Number or a table write.
  • Parse a JSON object string from an API response so you can bind nested keys.
Copyright © 2026