+ Start a Discussion

Populate List of custom object in Controller

I have a component where I am receiving the value of a record from another component (they click a button next to the row which opens the second component)  That component that contains the record is existinggroupstructure.

I want to take the values from the fields in that attribute and display them in multiple rows so the user can change the values and save the records and populate this attribute:

<aura:attribute name="newGroupStructures" type="Group_Structure__c[]"/>
Essentially, cloning the record that is in the existinggroupstructure attribute.

I'm just stuck on the controller to populate the list and the component (what to use) to display the new records.

Any help would be greatly appreciated!!