You need to sign in to do that
Don't have an account?
Sergey Volinets
How does map type of attribute work? How can I receive keys and values from map?
How does map type of attribute work? How can I receive the list of keys and list of values from the map in JavaScript?
I receive data from apex method, and I would like to use aura:attribute with map type to keep Id and Quantity, Is it possible to keep it on the client side using map type of attribute?
I receive data from apex method, and I would like to use aura:attribute with map type to keep Id and Quantity, Is it possible to keep it on the client side using map type of attribute?
<aura:attribute name="OpportunityLineItem" type="Map" default="{ '0065800000CINW0': 'name1', '0065800000CINWP': 'name2' }" />
go to below link for it.
http://www.sfdcmonkey.com/2016/11/16/how-to-use-map-in-lightning-component/
http://www.sfdcmonkey.com/2017/01/13/iterate-map-values-lightning-component/
Let me inform if it helps you and kindly mark it best answer if it helps you so it make proper solution for others
thanks
sfdcmonkey.com
var oliMap = component.get('v.OpportunityLineItem');
alert(OpportunityLineItem.Id);
OpportunityLineItem.Name = 'name3';