JSON Array

JSON Array

JSON array can store multiple values of type string, number, object, array, boolean, or null.JSON value must be separated by a comma and it is always placed inside the square bracket[].

JSON Array is of different types such as JSON array of string, JSON array of numbers, JSON array of booleans, JSON Array of Objects, and JSON multidimensional array.

JSON Array Of String

Let us see the example of JSON string data.


Inside the JSON string,a JSON array literal is exist.


From the above JSON literal, it is clear that JSON literal is similar to a javascript array.

Please keep in mind that array values can be of different types such as string, number, boolean, object, array, null, etc.

Formation Of Javascript Array From JSON Literal

Source Code

Try it now

Converting Javascript Array From JSON String

Accessing Array value through index such as ArrayName[index];

Javascript array can be created easily by parsing JSON string.

Source Code

Try it now

Accessing Array Inside Object

Source Code

Try it now