function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SalesForce_52436SalesForce_52436 

How to use Map in lightning component

Hi Guys,

Pls help me how to use map like this in lightning component.

component:--
<aura:iteration items="{!v.Accounts}" var="Acc">
    {!v.AccountMap[Acc.Id]}
</aura:iteration>


Thank You
Khan AnasKhan Anas (Salesforce Developers) 
Hi,

Greetings to you!

Please refer to the below links which might help you further with the above requirement.

http://www.infallibletechie.com/2016/05/how-to-iterate-map-in-salesfore.html

http://sfdcmonkey.com/2017/01/13/iterate-map-values-lightning-component/

https://www.biswajeetsamal.com/blog/iterate-map-values-in-lightning-component/

https://newstechnologystuff.wordpress.com/2018/05/21/iterate-map-in-lightning/

https://www.sfdc-lightning.com/2018/09/how-to-use-map-in-lightning-component.html

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
Danish HodaDanish Hoda
Hi All,
You can refer the link (https://developer.salesforce.com/forums/ForumsMain?id=9062I000000XwJyQAK)for better understanding and application.