Js traverses the sample code for the map content returned by json

  • 2020-03-26 21:41:42
  • OfStack

 
var yData = [];//Y data
var xData = [];//The X axis data
$(data.rows).each(function(i){ 

var obj = data.rows[i]; 
// alert(obj.key); 
// alert(obj.value); 

yData.push(obj.key); //The dynamic values
xData.push(obj.value); //The dynamic values
}); 

Related articles: