title: Leaflet map: filtering by year
body: <p>I've posted this question here before, but probably left out some context so I'm going to try again!  I have four geojson layers, each in array format.  To access info in these layers, it seems to be nested like so: layers-object-features-properties.</p>
  <p>Here is a sample of data structure:</p>
  <pre><code>{
  &quot;type&quot;: &quot;Feature&quot;,
  &quot;properties&quot;: {
  &quot;info_city&quot;: &quot;Wuerzburg&quot;,
  &quot;info_date&quot;: 2009,
  &quot;info_status&quot;: &quot;fac&quot;
  },
  </code></pre>
  <p>The property I want to filter by is date , which, in my data, is field &quot;info_date&quot;.  I wrote the following function, picking a random year to filter by as a test.  This will be linked to a range-slider bar on my map, ranged from 1971-2016.</p>
  <pre><code>function filterByYear(data){
      console.log(data)
      f = data.filter(function(d){ return d.features.properties.info_date === '2016';})
      console.log(f) 
      return f;
      }
  </code></pre>
  <p>As an aside, I have also tried this using underscore.js, to no avail:</p>
  <pre><code>f=_.filter(data, function(d) { return d.properties.info_date == 2016; });
  </code></pre>
  <p>So, I call this function where I'm indexing the range slider, like so, using the layer geoJsonLayers.fellows as the input.</p>
  <pre><code>    if (index == 2015) {
      filterByYear(geoJsonLayers.fellows)
    } 
  </code></pre>
  <p>Nothing happens, and in the filterByYear function, I am able to console.log (data), but nothing consoles for (f).  What am I doing wrong here?  And, is there an easier way to filter by year, as what I'm really trying to do is filter as the user moves through the range slider, i.e. when index = 1980, only data where &quot;info_date&quot; == 1980 would be displayed.</p>