title: Parsing GeoJSON with leaflet from an external API
body: <p>I'm trying to use an external API to retrieve GeoJSON data and ultimately show the data on a map. I'm using the leaflet library for the map and the issue I'm facing is that the data I get from this API seems fine (i.e. if I take the data from the console.log and then use it directly in the "L.geoJson(<strong>WHAT TO INPUT HERE</strong>)" it works) but for some reason if I try to use the object itselft it doesn't work.</p>
  
  <pre><code>                var map = L.map('map').setView([48.85, 2.35], 13);
                  var stamenLayer = L.tileLayer('https://stamen-tiles-{s}.a.ssl.fastly.net/toner/{z}/{x}/{y}.png', {
                    attribution: 'Map tiles by &lt;a href="http://stamen.com"&gt;Stamen Design&lt;/a&gt;, under &lt;a href="http://creativecommons.org/licenses/by/3.0"&gt;CC BY 3.0&lt;/a&gt;. Data by &lt;a href="http://openstreetmap.org"&gt;OpenStreetMap&lt;/a&gt;, under &lt;a href="http://creativecommons.org/licenses/by-sa/3.0"&gt;CC BY SA&lt;/a&gt;.'
                  }).addTo(map);
  
                  function reqListener () {
                    console.log(this.response);
                  }
  
                  var oReq = new XMLHttpRequest();
                  oReq.addEventListener("load", reqListener);
                  oReq.open("GET", "http://dataratp.opendatasoft.com/api/records/1.0/download?dataset=liste-des-commerces-de-proximite-agrees-ratp&amp;rows=100&amp;format=geojson");
                  oReq.send();
                  L.geoJson(**WHAT TO INPUT HERE**).addTo(map);
  </code></pre>
  
  <p>Not too sure what's causing the issue as the data looks fine (I tested it on <a href="http://geojsonlint.com/" rel="nofollow">http://geojsonlint.com/</a>).</p>
  
  <p>Thanks for your help,
  Julien</p>