I need to make an array for iteration selected objs in future. But when I push needed element, it updates. It's because I always call a new var: var objs = []; How can I add the element right?
My code:
var objs = [];
objs.push(objs);
objs.push(event.getSource().get("v.name"));
component.set('v.objs', objs);
In cmp:
<aura:attribute name="objs" type="MyObject__c[]" />