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

How to traverse Map objects in js

高洛峰
Release: 2017-01-14 11:46:18
Original
4797 people have browsed it

How to traverse Map objects in js

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

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template