You need to sign in to do that
Don't have an account?
Artem Artemenko 9
Iterating through an custom object list
Hi. I return custom object to js by callback, then take it in aura component like .
<aura:attribute name="customObj" type="customObj__c[]"/>Also i have list of custom fields in this object (endless)
<aura:attribute name="listObjKeys" type="String" default='["Field1__c","Field2__c","Field3__c","Field1__c","Date__c"]'/>How i can iterate through my object to display values by field. I try this, but with no result
<aura:iteration items="{!v.customObj}" var="co"> <aura:iteration items="{!v.listObjKeys}" var="keys"> <tr>{!keys}</tr> </aura:iteration> </aura:iteration>
Say a child component:
In main component change the iteration like this: