set
Set script variables to the specified values. Variables set using set can be removed
using unset.
set
An object that accepts user-defined key-value pairs. Each key is a variable name: an ASCII letter or underscore followed by
up to 255 ASCII letters, digits, or underscores, optionally prefixed with vars.. vars.foo sets the same variable as
foo. These naming rules apply only to the variable names, not to keys inside an assigned object.
Values can be any JSON value. After variable expansion, each value can nest objects and arrays at most 62 levels deep, counting the value itself; scalars don’t add a level. A deeper value isn’t stored.
Variables
Any variable with a valid name can be set by this method.
Examples
Setting variables
Setting multiple variables
See Also
- Variables and Expressions: Complete reference for SWML variables, scopes, and syntax
- unset: Remove variables from the script