JSON and AJAX with JavaScript for beginners: Learn how to use JSON data within your web applications




JSON and AJAX with JavaScript for beginners: Learn how to use JSON data within your web applications

by Laurence Lars Svekis

  • Length: 106 pages
  • Edition: 1
  • Language: English
  • Publication Date: 2022-02-02

JSON is short for JavaScript Object Notation which is the most commonly used data standard format for transferring data. It’s human readable which makes it easy to read. It’s used across all modern programming languages. Because it’s based on JavaScript Objects, understanding of how to get content from JavaScript objects and arrays is essential in being able to better make use of data with JSON. JSON objects can hold a lot of data, in a format which can contain objects that can be many levels deep, and arrays that might hold many items.

AJAX is a set of technologies used to connect to server data, and update page contents without page refresh. AJAX is now commonly used to get JSON data and provides an excellent way for web developers to create content with rich interactive features for web pages. JavaScript can be used to create page elements, update and manipulate page elements on the fly.

Together JSON AJAX and JavaScript is a powerful set of technologies that can be used to create amazing web experiences.

The lessons of this book are designed to help you learn more about what JSON data is and how you can use it. Loaded with coding examples. Introduction to how arrays and objects work in JavaScript code will help provide context to JSON data and how you can get values from the data. JSON is perfect for AJAX requests that allow you to bring data that can be used within the code. JavaScript can update and manipulate web page contents by connecting to the browser DOM.

The final project of this book will show you how to share your Google Sheet data as JSON, connect to the JSON Google Apps Script web app endpoint with JavaScript and then use the data while creating interactive web page elements. We build a Quiz from scratch that uses Google Spreadsheet data and can output the quiz questions with JavaScript dynamically building the quiz game. Add new questions to the sheet and have them load as JSON data into your web application and the JavaScript code dynamically adjusts for the new data. Using Get to retrieve the data, and Post to send the scores of the users to be tracked and added into the spreadsheet. Build your own version of this interactive quiz, as you learn more about JSON and AJAX using JavaScript code.

Leave a Reply

Your email address will not be published. Required fields are marked *