Newer Version Available
Object Types
An attribute can have a type corresponding to an Object.
1<aura:attribute name="data" type="Object" />For example, you may want to create an attribute of type Object to pass a JavaScript array as an event parameter. In the component event, declare the event parameter using aura:attribute.
1<aura:event type="COMPONENT">
2 <aura:attribute name="arrayAsObject" type="Object" />
3<aura:event>In JavaScript code, you can set the attribute of type Object.
1// Set the event parameters
2var event = component.getEvent(eventType);
3event.setParams({
4 arrayAsObject:["file1", "file2", "file3"]
5});
6event.fire();