Plugin API – Find a specific variantProperty

Hi,

is there any way to access variantProperties of a component and search for a specific one and check the value of it?

By console.log(node.variantProperties) I can see the actually settings. But I want to check for {property: true/false} and execute some code only if the property is defined as true for example.

Is there a way to do this?

Should be pretty trivial. Loop through variantProperties keys and check values against what you have

You’re right. Was way easier than I thought. Don’t know, why I couldn’t see it :smiley:

for (let prop in node.variantProperties) {
}