Home >Web Front-end >JS Tutorial >How to traverse Map objects in js

How to traverse Map objects in js

高洛峰
高洛峰Original
2017-01-14 11:46:184795browse

How to traverse Map objects in js

console.log(jsonData);//火狐控制台打印输出: Object { fileNumber="文件编号", fileName="文件名称"}
 
for(var key in jsonData)
  console.log("属性:" + key + ",值:"+ jsonData[key]);
}

Printout:

Attribute: fileNumber, value: file number

Attribute: fileName, value: file name

The above method of traversing Map objects in js is all the content shared by the editor. I hope it can give you a reference, and I also hope you will support the PHP Chinese website.

For more articles related to methods of traversing Map objects in js, please pay attention to the PHP Chinese website!

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