30 lines
1.2 KiB
Markdown
30 lines
1.2 KiB
Markdown
---
|
||
title: JSON Arrays
|
||
localeTitle: Массивы JSON
|
||
---
|
||
## Массивы JSON
|
||
|
||
Массивы JSON не отличаются от обычных объектов массива, которые вы используете в Javascript. Его объект массива, который содержит несколько `JSON Objects` .
|
||
|
||
Вот пример массива JSON:
|
||
|
||
```Javascript
|
||
var aMyPlaylist = [{
|
||
artist: "Ed Sheeran",
|
||
track: "Supermarket flowers",
|
||
myRating: 10
|
||
}, {
|
||
artist: "Tracy Chapman",
|
||
track: "Fastcar",
|
||
myRating: 9
|
||
}];
|
||
```
|
||
|
||
Это массив JSON, названный как `aMyPlaylist` . Все методы массива, такие как `map` , `filter` , `sort` и т. Д., Могут применяться и на любом массиве JSON
|
||
|
||
#### Дополнительная информация:
|
||
|
||
Дополнительные методы массива можно найти в следующих ссылках
|
||
|
||
* [Массив - Freecodecamp](https://guide.freecodecamp.org/javascript/standard-objects/array)
|
||
* [Array - Сеть разработчиков Mozilla](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) |