From the course: JSON Essential Training

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Build a nested JSON structure

Build a nested JSON structure - JavaScript Tutorial

From the course: JSON Essential Training

Build a nested JSON structure

- [Instructor] In real world JSON data, it's common to encounter structures with multiple layers. For instance, an array, in which each element is itself an object, this file contains departure estimates for trains in the bay area, rapid transit system in California, the starting curly brace indicates that the overall structure is an object, but many of the keys have additional objects as their values and some even have arrays as their values. For instance, if I scroll down here, the estimate key contains an array with three objects in it. If the structure feels a little overwhelming, that's okay. It can be challenging to make sense of everything going on here. Especially if you're new to JSON. To get a feel for how all the pieces fit. Let's build out our own nested structure together. In the extremes.JSON file, I want to create a JSON object with two keys, highest peaks and lowest points. The value for each key will be an…

Contents