Loading Depth Study
Preparing your workspace
JSON objects represent named properties while JSON arrays represent ordered collections of values.
Real application data is usually more complex than one simple value. JSON objects can contain nested objects and arrays, and arrays can contain objects. This makes JSON flexible enough to represent users, products, courses, API responses, and many other structures. At the same time, deeply nested data can become difficult to understand, so structures should remain clear and purposeful.
An API can return a course containing an instructor object and an array of lesson objects.
{
"title": "JavaScript Basics",
"instructor": {
"name": "Aman",
"role": "mentor"
},
"lessons": [
{
"id": 1,
"title": "Variables"
},
{
"id": 2,
"title": "Functions"
}
]
}The JSON structure contains nested objects and an array of lesson objects.