title: Bing Maps .v7 How to iterate map.entities?
body: <p>I'm adding many polylines to my map. But after some logic I need to iterate the map.entities collection and get all my polylines.</p>
  
  <pre><code>              var polylineN = new Microsoft.Maps.Polyline(loc);
  
                // Add the pushpin
                map.entities.push(polylineN);
  </code></pre>
  
  <p>If I iterate my map.entities I get functions, Objects, and many data.
  I think I need to use the map.entities.get function to retrieve the correct entities, but how will I know the index length to iterate it?</p>
  
  <pre><code> map.entities.get(0) //works fine
  </code></pre>
  
  <p>Something like:</p>
  
  <pre><code>  _.each(map.entities, function(entity){
              console.log(entity); //it returns all kind of data
          });
  </code></pre>
  
  <p>Any help will be appreciated, any javascript iteration sample or underscore iteration sample is valid.</p>