I am using Figma variables API to access the value for a variable which is aliased to variable from another collection.
E.g.
variable_b is aliased to variable_a and I want to resolve it to the final value, how do I know which value should I pick out of the two values that are available under “valuesByMode” for variable_a?
variable_a: {
"id": "VariableID:302:562"
"valuesByMode": {
"302:0": {
"r": 0.20000000298023224,
"g": 0.20000000298023224,
"b": 0.20000000298023224,
"a": 1
},
"365:2": {
"r": 0.20000000298023224,
"g": 0.20000000298023224,
"b": 0.20000000298023224,
"a": 1
}
}
}
variable_b: {
"id": "VariableID:302:700"
valuesByMode: {
"302:2": {
"type": "VARIABLE_ALIAS",
"id": "VariableID:302:562"
},
"310:3": {
"type": "VARIABLE_ALIAS",
"id": "VariableID:302:562"
}
}