I’m new to javascript and the use of json.
What I want to do is really simple, yet I’m struggling with it.
I need to build a website with two pages, one that show artists, the others show their works. I need to build it dynamically only with javascript and the help of a json file.
So I’ve already build the two pages with html and Css and let some empty space to fill it with the data.
For example here is a template for the artist :
<div class="artists-id">
<a class="frame-link"href="">
<img id= "photo" class="photo" src=""></img>
</a>
<h2 id="name" class="name"></h2>
<span class="description">
<p id= "location" class="location"></p>
<p id= "tagline" class="catchphrase"></p>
<p id= "price" class="price"></p>
</span>
<span class="label">
<ul class= "tags-label">
<li class="tag-elm">
<a href="#" id= "tag" class= "tag"></a>
</li>
</ul>
</span>
</div>
I also have a JSON file (internal not external !) with all the data that look like this :
{
"artists": [
{
"name": "Boris Kein",
"id": 801,
"city": "London",
"country": "UK",
"tags": ["portrait", "events", "travel", "animals"],
"tagline": "Beauty is everywhere",
"price": 400,
"portrait": "BorisKein.jpg"
},
So far I was just able to fetch the data like that :
async function fetchData() {
const response = await fetch("javascript/data.json");
const data = await response.json();
console.log(data);
};
fetchData();
Now I’m little lost how can I use my data to fill the blank space in my html ?
order furosemide online – lasix daily lasix best price
viagra 20 mg online – how to get viagra in india buy sildenafil citrate online
tadalafil 80mg – prices for cialis tadalafil price
hollywood casino online – online casino chumba casino
erectile dysfunction treatment options – erectile dysfunction pills over the counter buy ed pills
order prednisone without prescription fast shipping – prednisone 60 mg pills prednisone without prescription
sildenafil tablets 100mg india – where to buy real generic viagra usa viagra
buy cialis through paypal – Overnight delivery cialis buy tadalafil 20mg price
ivermectin tablet – stromectol oral ivermectin price comparison
low cost ed pills – vitamins for ed best erectile dysfunction pills
doxycycline 2984 – doxycycline 1000 mg best buy doxycycline tablets
generic neurontin 600 mg – neurontin 100 mg tablets synthroid 100 mg
how do i buy viagra online – how to order viagra without a prescription
vardenafil online us – discount vardenafil cheap vardenafil
prednisone 40 mg tablet – deltasone 5 mg drug deltasone 20 mg tablet
buy accutane from canada – 100 mg accutane accutane best price
amoxicillin price at cvs – buy amoxicilin 500 mg from canada kroger amoxicillin price
assignment company – homework essay help top essay writers
price of viagra 2018 – Buy viagra from canada viagra viagra 25mg
ivermectin medication – ivermectin virus ivermectin 3mg tab
furosemide australia – furosemide 20 mg tablets lasix vs furosemide
ventolin cost canada – ventolin hfa inhaler ventolin cost canada
cytotec order online uk – cytotec buy online cytotec online in south africa
doxycycline 100mg buy online – prednisolone prednisolone over the counter australia
stromectol price in india – buy ivermectin usa stromectol xr
sildenafil coupon – herbal sildenafil discount sildenafil
buying tadalafil online safely – buy tadalafil online safely tadalafil 20 mg
ivermectin oral – stromectol dosage ivermectin 0.5% brand name
meaning of amoxicillin
how can i buy viagra online – Buy cialis without a prescription real cialis cheap
india propecia
levitra vardenafil – vardeed erectile dysfunction age