title: Get other json value from another value
body: <p>I am retrieving the maximum and minimum from a long JSON response. I managed to retrieve those values, but I want to retrieve also the date of those values. The structure of the JSON response is:</p>
  
  <pre><code>?({"channel":{"id":XXXXX,"name":"XXXXXX","field1":"Temperature","field2":"Humidity","created_at":"2015-11-03T13:12:06Z","updated_at":"2015-11-15T12:07:37Z","last_entry_id":142},"feeds":[{"created_at":"2015-11-14T21:06:16Z","entry_id":136,"field1":"0"},{"created_at":"2015-11-14T21:06:39Z","entry_id":137,"field1":"25"},{"created_at":"2015-11-14T21:06:59Z","entry_id":138,"field1":"24.05"},{"created_at":"2015-11-14T21:07:13Z","entry_id":139,"field1":"24.45"},{"created_at":"2015-11-14T21:08:16Z","entry_id":140,"field1":"24.45"},{"created_at":"2015-11-15T12:06:18Z","entry_id":141,"field1":"24.5"},{"created_at":"**2015-11-15T12:07:37Z**","entry_id":142,"field1":"**21.4**"}]})
  </code></pre>
  
  <p>In ** are the values that I retrieve in the jquery code. And this is my jquery code:</p>
  
  <pre><code>$.getJSON('http://api.thingspeak.com/channels/'+channel+'/field/1.json?callback=?',
                  {key: read_API_key, days: "1"},
                  function(data) {
                      var temp_vals = [];
                      var temp_vals_date = [];
                      $.each(data.feeds, function() {
                          temp_vals.push(parseFloat(this.field1));
                          temp_vals_date.push(this.created_at);
                      });
                      var temp_max = Math.max.apply(Math, temp_vals);
                      var temp_min = Math.min.apply(Math, temp_vals);                 
                      $('#temp1_max').text(temp_max + ' ºC');
                      $('#temp1_min').text(temp_min + ' ºC');
  
                      console.log("Temp vals: "+temp_vals);
                      console.log("Temp vals date: "+temp_vals_date);
  
                      console.log("Max val: "+temp_max);
                      console.log("Min val: "+temp_min);
                  }
              );
  </code></pre>
  
  <p>The console show the correct values for all the data, but the question is: Are there any way to link the maximum value with the date?, or find in which position of the array is the maximum value after doing the math function?</p>
  
  <p>I think this shouldn't be difficult but I am trying to find something in Internet and I didn't find anything. I'm a little messed up with the JSON responses.</p>