Structured Data#
|
|
| Linear Array | Associative Array |
In this chapter, we’re going to look at aspects of I/O that have to do with reading and writing files, with a focus on two key data structures:
Tabular data, or data stored as a table consisting of rows and columns
Data stored as name-value pairs, specifically in the JavaScript Object Notation (
.json) format
We can connect these two types of data structures back to the concepts of linear and associative arrays covered previously in the course. A quick refresher:
“In computer science, an array is a data structure consisting of a collection of elements (values or variables), each identified by at least one array index or key…The simplest type of data structure is a linear array, also called one-dimensional array” (Wikipedia, “Array (data structure)”)
Associative arrays are “an abstract data type that stores a collection of (key, value) pairs, such that each possible key appears at most once in the collection” (Wikpedia, Associative Array)

