Home >Web Front-end >JS Tutorial >jQuery method of traversing multiple maps in json_jquery

jQuery method of traversing multiple maps in json_jquery

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 16:14:271632browse

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.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn