collection.getName()
collection.getName()
Retrieves the name of the variable collection.
Syntax
collection.getName(): Promise<string>
Returns
Promise< string
>
A Promise that resolves to a string
of the Variable Collection's name
Example
// Get Collection
const defaultVariableCollection = await webflow.getDefaultVariableCollection();
// Get Collection Name
const collectionName = await defaultVariableCollection?.getName()
console.log(collectionName)