title: How to do an entry in javascript map from ajax call
body: <p>I am modifying my previous question since I feel this problem is closely related to putting an entry in map from ajax call. There is nothing wrong with Map.</p>
  
  <p><strong>EDIT</strong> :-</p>
  
  <p>I am populating a map of feeds in following ways where key represent url and value represent feeds;</p>
  
  <pre><code>channelMap.each(function(key,url,n){
      loadFeedFor(url,10);
      console.debug(feedMap);
  });
  :
  function loadFeedFor(url,maxposts){
       var gurl = "http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&amp;callback=?&amp;q="+url;
       if(maxposts != null) gurl += "&amp;num="+maxposts;
        $.getJSON(gurl, function(){})
       .done(function(data){
           feeds = data.responseData.feed;
           feedMap.put(url,feeds);
        });
   }
  </code></pre>
  
  <p>But it is not working. I guess I would have to use Deffered for this problem but have no idea how.</p>
  
  <p>I am using map from this <a href="https://stackoverflow.com/a/15739569/453767">answer</a>.</p>
  
  <p>I tried doing same thing in another way where I am not using map. I am calling following function with different 3 rss feeds url;</p>
  
  <pre><code>function rssfeedsetup(feedId,feedurl,feedlimit){
      var feedpointer=new google.feeds.Feed(feedurl); //Google Feed API method
      feedpointer.setNumEntries(feedlimit); //Google Feed API method
      feedpointer.load(function(response){
          console.log(response.feed);
          return setTimeout(displayFeed(response.feed,feedId), 3000);
      }); //Google Feed API method
  }
  </code></pre>
  
  <p>console prints all feeds properly (25 entries). But feeds actually appear on page are 
  always less. Even delay is not helping me.</p>