title: d3.js - max and min value from json data which has array of values
body: <p>How do i find the max and min values from JSON data. I want the max of checkins and Checkintimes of data1,data2 ...data(n). My code is :</p>
  
  <pre><code> var max = d3.max(data, function(d) { return d.Checkintimes;} );
   var min = d3.min(data, function(d) { return d.Checkintimes;} );
  </code></pre>
  
  <p>I tried this option too</p>
  
  <pre><code>d3.json("Values.json", function(data) {
  
  
  
  var maxmbt = d3.max(d3.values(data) );
  var maxcheckins = d3.max(d3.values(data));
  
  console.log(maxmbt);
  console.log(maxcheckins);
  
  xScale.domain([0,maxcheckins]);
  xScale.domain([0,maxmbt]);
  
  });
  </code></pre>
  
  <p>I have a json in this format:</p>
  
  <pre><code>[
  {
     "name":"data1",
      "checkins":[[1,0],[2,0],[3,0],[4,3],[5,0],[6,0],[7,0],[8,3],[9,0],[10,0],[11,0],[12,0]],
      "teamsize":[[1,0],[2,0],[3,0],[4,3],[5,0],[6,0],[7,0],[8,1],[9,0],[10,0],[11,0],[12,0]],
      "Checkintimes":[[1,0],[2,0],[3,0],[4,184],[5,0],[6,0],[7,0],[8,0],[9,0],[10,0],[11,0],[12,0]]
  },
  
  
  {"name":"data2",
  
  
      "checkins":[[1,0],[2,0],[3,0],[4,0],[5,0],[6,0],[7,0],[8,0],[9,0],[10,0],[11,27],[12,12]],
      "teamsize":[[1,0],[2,0],[3,0],[4,0],[5,0],[6,0],[7,0],[8,0],[9,0],[10,0],[11,11],[12,11]],
      "Checkintimes":[[1,0],[2,0],[3,0],[4,0],[5,0],[6,0],[7,0],[8,0],[9,0],[10,0],[11,10],[12,12]]
  }
  ]
  </code></pre>
  
  <p>currently when i use the returning value is an array. not an unitary value. For e.g checkins max value here is 27 and Checkintimes - 184 in the aforesaid example.</p>