I have a component attribute which is as follows:
<aura:attribute name="variants" type="Map" default="{names: ['Tom', 'Dick', Harry']}" />
The array in the map is used in lightning input components as follows:
<aura:iteration items="{! v.variants.names }" var="name">
<lightning:input value="{! name }" />
</aura:iteration>
The names are displayed in the input components when they are initially rendered but I noticed that any changes made to these names in the input components are not reflected in the array. The array still has the original values. Is there a way to two-way bind the data so that changes to the names in the input components are automatically made to the Map as well?