set
The set: command associates a value with a placeholder key.
start:
set:
name: Kina
title: Customer Support Manager
return:
output@text:
{{name}} is a {{title}}
Result:
output: Kina is a Customer Support Manager
Syntax
One or more key/value pairs may be children of the set:
command.
Sequential keys
You can refer to any keys set above the current one.
start:
set:
a@int: 2
b@int: {{a*2}}
c@int: {{b*2}}
return:
answer@int: {{a + b + c}}
Result:
answer: 14
Dictionaries
A dictionary may be provided as the value:
start:
set:
person:
name: Kina
role:
title: Customer Support Manager
return:
output@text:
{{person.name}} is a {{person.role.title}}
Result:
output: Kina is a Customer Support Manager
Paths
You can set a value using a key path with the var.set command.