JSON - Creating Content with jQuery

Now that we have a sense of JSON and its "object" and "array" structures, let's see how we can create content from JSON using JavaScript.

We'll use the jQuery JavaScript library to build up markup based on data in the JSON structure, and then we'll place it on the page.

We'll use the "seasons" array to build an unordered list of seasons.

The JSON data:

The result we will build:
json-create-content-1.png

Let's take a look at the important parts:

HTML:

JavaScript:

All Together

Complete markup is:

Copyright © David Heitmeyer