Can we dynamically build attribute name on run time in the lightning component?
Use case-
<aura:iteration items="{!v.attributeA}" var="key">
{!v.attributeB + "!key" + .length}
</aura:iteration>
So I am trying to use aura:iteration to loop through a list of string and within loop reference another attribute (type map). This map name has to use 'AttributeA : key' to form the correct name and then print the length of that map for that key.
Example,
AttributeA - "A, B"
AttributeB - "{OptionA : [item1, item2], OptionB : [item2, item3, item4]}"
Now, when looping through AttributeA, I need to reference AttributeB ("Option" + "A") to get number of items for OptionA (2 items), OptionB (3 items) etc.