Is it possible to iterate over a map in Lightning

According to the Aura docs it looks like this is only defined to iterate over a List.

If you have not seen the Aura docs app before it is available with any Salesforce instance by modifying the URL:

[your instance stuff].salesforce.com/auradocs/reference.app

Or to navigate to the page for the iteration component:

[your instance stuff].salesforce.com/auradocs/reference.app#reference?descriptor=aura:iteration&defType=component

I came across this question and was a little discouraged, but looks like things might have changed since some of these answers were provided.

I found this page in the Lightning Components documentation. All the way at the bottom, and really easy to overlook is what appears to be instructions for iterating over an Apex Map returned from a server-side controller.

I tried it out and it actually works! This controller function populates a picklist <ui:inputSelect ... /> in a Lightning Component by iterating over an Apex Map.

I guess this doesn't exactly answer the original question, but maybe the workaround is to do the iteration in a controller function and provide those results to the view.

({
    doInit : function(component, event, helper) {
        // Create the action
        var action = component.get("c.getApexMap");
        // Add callback behavior for when response is received
        action.setCallback(this, function(response) {
            var state = response.getState();
            console.log(state);
            if (component.isValid() && state === "SUCCESS") {
                //loop through map returned from Server, populating client picklist as we go

                var clientMap = response.getReturnValue();     //the apex map returned from server
                var opt = new Array();                         //this will be our picklist options

                for(key in clientMap) {     //this iterates over the returned map
                    opt.push({ class: "optionClass", label: clientMap[key].labelField__c,
                                                     value: clientMap[key].valueField__c });
                }

                component.find("myPicklist").set("v.options", opt);
            } else {
                console.log("Failed with state: " + state);
            }
        });
        // Send action off to be executed
        $A.enqueueAction(action);
    }
})

Not a straight Yes to the original question. The Maps can not go in directly, but we can use some thing like this.

Maps or list, all the collections are same for lightning components as it considers all these variables as json.

Try the following: Component:

    <aura:component >

    <aura:attribute name="colercodes" type="list"/> 
    <ui:button press="{!c.getColCodes}" label="Display Colors" />
    <aura:iteration items="{!v.colercodes}" indexVar="key" var="col">
        <p>
            <aura:set attribute="style" value="{!col.BGvalue}"/>
            {!key}: {!col.key} - {!col.value}
        </p>
    </aura:iteration>

</aura:component>

ComponentController.js:

({
    getColCodes: function(component) {
        var cols = []; 
            cols.push({
                value: '#F0F8FF',
                BGvalue: 'background:#F0F8FF',
                key: 'AliceBlue'  
        });
            cols.push({
                value: '#00FFFF', 
                BGvalue: 'background:#00FFFF',
                key: 'Aqua'  
        });
            cols.push({
                value: '#FAEBD7',
                BGvalue: 'background:#FAEBD7',
                key: 'AntiqueWhite' 
        });
            cols.push({
                value: '#7FFFD4',
                BGvalue: 'background:#7FFFD4',
                key: 'Aquamarine'  
        });

        component.set("v.colercodes", cols);
    }
})

===================

I happened to use something like this in one of my projects:

({
    doInit : function(component, event, helper) {
        var action = component.get("c.returnArticles");//Fetching Map/queryresult from Controller
        action.setCallback(this, function(a) {
            component.set("v.ArticleMap", a.getReturnValue()); 
            var Arts = component.get("v.ArticleMap"); 
              console.log(Arts); 
            var artsTemp = [];
            for (Art in Arts){
                console.log(Art);
            var temp =  Arts[Art]
            for (keyofMap in temp){ 

                //pushing the articles into Map/ List of component attribute
                artsTemp.push({
                    key: keyofMap,
                    value: temp[keyofMap]
                });
            } 
            }
            component.set("v.ArticleList", artsTemp);

        });
        $A.enqueueAction(action);
    }
})

Note: I was returning database.query() from the apex controller there.

We can not directly use the maps like we do in VF pages, we can pass that maps to json variable as they are and use them in components.

HTH