fetch

Get JSON with the Fetch API - JavaScript Tutorial

0:00
↔️ ↕️

Timecodes:

hey guys hey going my name is DOM and

today I want to demonstrate how to use

the fetch API to retrieve some JSON for

your web application okay so essentially

the fetch API is going to do two things

it's going to first make the request to

retrieve the JSON file and then it's

going to take the JSON contents and pass

it as a regular JavaScript object okay

so I've got here in my text editor an

index.html file and also a people dot

JSON file right in the same directory

okay so we have here just a regular JSON

object with a date and some people in an

array okay so we're going to be

retrieving this right here using the

fetch API so back inside the index.html

file let's go inside the JavaScript and

firstly just make a new fetch request

okay so we're gonna write fetch down

here and pass in here people with dot


Related queries:


how to get json data from url in react js
how to get json data from url in node.js
javascript fetch json example
fetch json example
javascript fetch url example