APIsChangelog
Log In

Get variable name

variable.getName()

Retrieves the name of the variable.

Syntax

variable.getName(): Promise<string>;

Returns

Promise<string>

A Promise that resolves to a string with the variable name

Example

// Get Collection
const collection = await webflow.getDefaultVariableCollection()

// Get All Variables
const variables = await collection.getAllVariables()

// Get Value of first Variable
const variable = variables[0]
const value = await variable.getName()