Files
freeCodeCamp/guide/chinese/javascript/standard-objects/json/json-arrays/index.md
2018-10-16 21:32:40 +05:30

30 lines
917 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: JSON Arrays
localeTitle: JSON数组
---
## JSON数组
JSON数组与您在Javascript中使用的普通数组对象没有什么不同。它是一个包含多个`JSON Objects`的数组`JSON Objects`
以下是JSON数组的示例
```Javascript
var aMyPlaylist = [{
artist: "Ed Sheeran",
track: "Supermarket flowers",
myRating: 10
}, {
artist: "Tracy Chapman",
track: "Fastcar",
myRating: 9
}];
```
这是一个名为`aMyPlaylist`的JSON数组。所有数组方法`map` `filter` `sort`也可以应用于任何JSON数组
#### 更多信息:
可以在以下链接中找到更多数组方法
* [数组 - Freecodecamp](https://guide.freecodecamp.org/javascript/standard-objects/array)
* [阵列 - Mozilla开发者网络](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)