Syntax
addToContext(key, value, mode)
Description
Adds a value to the Context object. Parameters:key
:string
— the key in the Context object where the value should be stored.value
:unknown
— the value to store.mode
:"simple" | "array"
:"simple"
— stores the value directly at the specified key, replacing any existing value."array"
— adds the value to an array at the specified key, creating the array if it doesn’t exist.
void
Example
Simple Mode
Simple Mode
Array Mode
Array Mode