I have a lightning component where I dynamically generate some columns and some input fields. I have a String Array as attribute. How do I get the index of the array to pass the value. I tried below but this gives me an expression error.
Attribute
<aura:attribute name="searchKeywordArr" type="String[]" description="store search input"/>
Iteration
<aura:iteration items="{!v.colData}" var="obj" indexVar="index">
<td role="gridcell">
<lightning:input
value="{!v.searchKeywordArr[v.indexVar]}"
required="false"
placeholder="{!obj.label + '...'}"
aura:id="{!obj.Id}"
label="{!obj.label}"
variant="label-hidden"/>
</td>
</aura:iteration>