I'm trying to get the key/value pair in the aura component

Aura component:

<aura:attribute name="countryMap" type="Map"  default="{}"/>
<aura:attribute name="currentCountry" type="String" />

<aura:iteration items="{!v.countryMap}" var="cus" indexVar="key">
       here is the key:= {!cus.key} - {!cus.value}<br/><br/>


 var countryMap = component.get("v.countryMap");
 var newcountryMap = {
            'us': $A.get("$Label.c.countryUSAURL"),
            'ca': $A.get("$Label.c.countryCANURL")
langMap = newLangMap;

Does not work, countryMap is empty

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.