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
Data Types
The seven JSON value types.
Nested Objects
Objects within objects for hierarchical data.
Schema Validation
Validate structure with JSON Schema.
JSONPath
Query expressions for locating nodes.
Merge Patch (RFC 7386)
Partially update JSON documents.
JSON Pointer (RFC 6901)
Address a specific value by path.