Skip to main content
Question

How do I get complete list of Variable Collections and Aliases?


Sajid1

Hi everyone,
How do I get a complete list of Variable collections and Alises used in the variables?
So far I have managed to get the collection names, but unable to figure out what to do next?

This is my code so far:
I get the collections like this:

 await figma.variables.getLocalVariableCollectionsAsync();

After that I iterate through the list:

for(let C=0; C<V.length; C++){
 //console.log(V[C].variableIds);
 for(let i=0; i<V[C].variableIds.length; i++){
  console.log(V[C].variableIds[i].valueOf());
 }

This is that the structure of my collections looks like (just a sample text variables)

This topic has been closed for replies.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings