The example in this article describes how jQuery traverses multiple maps in json. Share it with everyone for your reference. The specific implementation method is as follows:
jQuery.each(data.root,function(key,value){ for(var i = 0 ; i < value.length; i++ ){ var tmpArr = []; var obj = value[i]; //tmpArr.push(obj["collectDate"]); tmpArr.push(3*i); tmpArr.push(obj["kpiValue"]); arr.push(tmpArr); myChart.setTooltip(tmpArr); }
I hope this article will be helpful to everyone’s jQuery programming.