+ Start a Discussion
Ashish Kumar 743Ashish Kumar 743 

Dynamic Aura:Id inside Aura:Iteration

I have one component in this i'm creating dynaminc row and column in table . we can get the value from Component to JS controller using Aura:id but i'm not understanding how we can get the values of row which i have created dynamically?? how we can set the aura:id for that dynamic row and how to get that value in js controller 
AbhinavAbhinav (Salesforce Developers) 
Hi Ashish,

Please share the code snippet so that community can help you better.

I want only one value from the json but i'm getting all the values how can i stop iteration or is there any way to show only one row like keeping size please help to find the solution

Thank you in Advance,

                        <aura:iteration items="{!v.jsonValues}" var="item" indexVar="rowIndex">  
                            <tr data-data="{!rowIndex}">
                                <td role="gridcell" tabindex="-1" data-label="Record Type Name">                            
                                    <span class="slds-grid slds-grid_align-spread">
                                        <div class="slds-truncate">                                        
                                            <span class="slds-truncate">{!item.firstName}</span>

Original Output:-

Expected Output:-