Skip to main content

Syntax

getContext(key)

Description

Retrieves the value associated with a given key in the Context object. Parameters:
  • key: string โ€” the key in the Context object from which the value should be retrieved.
Returns: unknown โ€” the value stored at the specified key in the Context object, or undefined if the key doesnโ€™t exist.

Example

const userName = getContext("user.profile.name");
log(`User name is: ${userName}`);