Nested data stores values inside other values or structures rather than in rows and columns. Think nesting dolls: each layer can hold another layer. Alongside tables, it is one of the two data formats that matter most in visualization work. section 3.0 section 3.5 section 3.5.2
You will often encounter nested data as JSON, short for JavaScript Object Notation. JSON groups basic values—such as numbers, strings, Booleans, and sometimes dates—so they can be handled together or referred to through one name. section 3.5.2
Two building blocks make the layers manageable:
- Arrays hold a sequence of values. In JSON, elements sit inside square brackets, are separated by commas, and share a data type. A two-dimensional array is simply an array containing smaller arrays. section 3.5.2
- Objects provide names for grouped values or arrays. They add context when an unlabeled stack of repeated arrays would otherwise become confusing. section 3.5.2
From a weekly schedule to fruit data
A list of days is a one-dimensional array. Giving each day its own array of morning, noon, evening, and night creates a second dimension; placing those arrays under day names makes the structure easier to read. The same pattern can represent fruit scores, with named fields and a data array inside a larger JSON object. section 3.5.2
{
"title": "Fruits",
"version": 1.1,
"data": [
{
"fruit_name": "Fuyu Persimmons",
"taste_score": 100
},
{
"fruit_name": "Mangos",
"taste_score": 100
},
{
"fruit_name": "Peaches + Nectarines",
"taste_score": 100
},
{
"fruit_name": "Bananas",
"taste_score": 80
},
{
"fruit_name": "Kiwis",
"taste_score": 70
},
{
"fruit_name": "Apples",
"taste_score": 60
},
{
"fruit_name": "Oranges",
"taste_score": 50
}
]
}
Inspect a JSON object that combines top-level metadata with a nested array of fruit records; it shows how labels and grouped records can coexist. section 3.5.2
Nested structures can be useful once coding enters the picture, but they fit less comfortably into a SQL-dominated workflow because rows and columns are comparatively rigid. When a structure becomes deeply layered, clear names help keep it from turning into a pile of unlabeled containers. section 3.5.2






