JSON Server


JSON is often used to send and receive data with a web server.

When data comes from a web server, it is always in the form of text.

To understand the text, you can use JSON.parse(). This function helps convert the data into a JavaScript object.


Receiving Data

If you get data in JSON format, you can quickly change it into a JavaScript object.


JSON From a Server

You can ask the server for JSON data by making an AJAX request.

If the server sends back information in JSON format, you can change that information into a JavaScript object.


Array as JSON

If you use JSON.parse() on JSON that comes from an array, it will give you a JavaScript array, not a JavaScript object.