Skip to content
JSON

Arrays

Lists of mixed and homogeneous values.

By EZ4Code Team
arraylist

Code

{
  "mixed": [1, "two", true, null],
  "matrix": [[1, 2], [3, 4]],
  "users": [
    { "id": 1, "name": "Alice" },
    { "id": 2, "name": "Bob" }
  ]
}

Explanation

JSON arrays are ordered lists enclosed in square brackets that can hold any JSON value, including other arrays and objects. Arrays of objects are the most common shape for tabular or record-set data. Elements are separated by commas without a trailing comma.

More JSON Snippets