title: Min and Max values of an array of dictionaries (JSON)
body: <p>I'm having trouble getting the maximum and the minimum values out of my dataset. I think this (// <a href="https://stackoverflow.com/questions/2620922/get-the-largest-value-from-json-object-with-javascript">Get the largest value from Json object with Javascript</a> combined with <a href="https://stackoverflow.com/questions/11817861/math-min-apply-returns-0-for-null">Math.min.apply returns 0 for null</a>) comes closest to what I need, however my data is a bit more complicated (at least from my 'beginners point of view').</p>
  
  <p>my dataset concerns life expectancy for all countries from 1995 till 2016 and looks like this:</p>
  
  <pre><code>[{"country":"Abkhazia","1995":null,"1996":null,"1997":null,"1998":null,"1999":null,"2000":null,"2001":null,"2002":null,"2003":null,"2004":null,"2005":null,"2006":null,"2007":null,"2008":null,"2009":null,"2010":null},
  {"country":"Afghanistan","1995":null,"1996":null,"1997":null,"1998":null,"1999":null,"2000":null,"2001":null,"2002":5.7,"2003":6.8,"2004":6.4,"2005":6.6,"2006":6.8,"2007":7.3,"2008":7.0,"2009":7.6,"2010":7.6},
  {"country":"Akrotiri and Dhekelia","1995":null,"1996":null,"1997":null,"1998":null,"1999":null,"2000":null,"2001":null,"2002":null,"2003":null,"2004":null,"2005":null,"2006":null,"2007":null,"2008":null,"2009":null,"2010":null},
  {"country":"Albania","1995":2.6,"1996":4.0,"1997":4.8,"1998":5.3,"1999":5.8,"2000":6.4,"2001":6.0,"2002":6.3,"2003":6.2,"2004":6.9,"2005":6.8,"2006":6.7,"2007":6.9,"2008":6.7,"2009":6.9,"2010":6.5},
  etc.
  </code></pre>
  
  <p><strong>What I need:</strong></p>
  
  <p>The maximum value and the minimum value for the complete dataset.<br>
  For the example this would be:</p>
  
  <pre><code>min: 2.6
  max: 7.6
  </code></pre>
  
  <p>I'm making a datamap using D3 and I want to use the values to create a range of colors.</p>
  
  <p><strong>Code I tried</strong></p>
  
  <p>As said in the introduction I think I need a combination of the two links given above, however I cannot make it work. For example, using the second link I van get the minimum value for a given country, but not the minimum of all countries. </p>
  
  <p>Hope someone can help me!</p>