fetch

Display JSON data in HTML table using JavaScript

0:00
↔️ ↕️

Timecodes:

hello everyone in this tutorial we are

going to see how to fetch the data from

a json file and display them in a table

with javascript and the fetch method

if you look at my browser you will see a

table of products

this is the end result this is what we

get at the end of this tutorial

let's take the browser out of our way

and take a look where those products are

coming from

the products are stored in a file called

products.json

and it's the file that we see right now

as you can see in the file we have an

array of objects

every object is a product every product

has properties

and so here we have an id a name a price

an inventory and a product called

property