New Batch#100 (10th Nov 2021) - Salesforce Admin + Dev Training (WhatsApp: +91 - 8087988044) :

Tuesday 3 January 2017

Not able to access the array values which are inside of the JSON object from the Lightning Component if 'Enable Lightning LockerService Security update' is enabled

If you add the JSON response which is having the array directly to the Lightning Component Attribute, It is not working.

JSON RESPONSE for response.myData:


Issue: Not able to access entries and myIndex which are coming after entries (which is Array).

Example:  cmp.set('v.myData', response.myData);


Stringify and Parse it like below -
cmp.set('v.myData', JSON.parse(JSON.stringify(response.myData)));