You need to sign in to do that
Don't have an account?
Nicole Levy
but when I call component.get('v.events') a javascript proxy is returned, which is fine, but I'm not sure how to get the target array out of the proxy. Thanks in advance.
Retrieve array stored in aura attribute
Hi, so I am storing an array in an aura attribute that is set up like so:
<aura:attribute name="events" type="Asset[]" />
but when I call component.get('v.events') a javascript proxy is returned, which is fine, but I'm not sure how to get the target array out of the proxy. Thanks in advance.
Hi,
you can also do something like :
in controller,
now inside the loop , you can access the fields by on.fieldAPI.
Hope this helps.
Regards
All Answers
You shoud post the result for the console log ( Control + Shift + J under Chrome for accessing the console directly )
var myArray = component.get('v.events');
console.log( JSON.stringify ( myArray ) );
Hi,
you can also do something like :
in controller,
now inside the loop , you can access the fields by on.fieldAPI.
Hope this helps.
Regards