xxxxxxxxxx
[
{
"id": 1,
"name ": "headphone - 1",
"category_id": 1,
"description": "Product of a phone details",
"price": 100,
"is_available": false,
"rating": 4
},
{
"id": 1,
"name ": "Laptop - 1",
"category_id": 2,
"description": "Product of a Laptop details",
"price": 10000,
"is_available": true,
"rating": 5
},
{
"id": 1,
"name ": "GetForce - 1",
"category_id": 3,
"description": "Product of a graphics detail details",
"price": 20000,
"is_available": true,
"rating": 5
},
{
"id": 4,
"name ": "Laptop - 1",
"category_id": 4,
"description": "Product of a Laptop details",
"price": 10000,
"is_available": true,
"rating": 5
}
]
xxxxxxxxxx
[{"_id":"60beb338abe3dd4300d844b8","email":"hemitpatel0@gmail.com","typeVaccine":"Moderna","status":"Yes","__v":0},{"_id":"60bf716b145de95f1c84fb2f","email":"hemit.2009@outlook.com","typeVaccine":"Asternzcana","status":"No","__v":0},{"_id":"60bf7196145de95f1c84fb31","email":"hemitpatel@computer4u.com","typeVaccine":"Phizer","status":"Yes","__v":0},{"_id":"60bf758f145de95f1c84fb32","email":"blahbro96@gmail.com","typeVaccine":"none","status":"No","__v":0},{"_id":"60bf7cda145de95f1c84fb33","email":"vimal4282@yahoo.co.in","typeVaccine":"Moderna","status":"Yes","__v":0}]
xxxxxxxxxx
const results = document.querySelector("#results")
fetch("http://www.omdbapi.com/?s=harry potter&apikey=adf1f2d7")
.then(response => response.json())
.then((data) => {
data.Search.forEach((result) => {
const movieTag = `<li class="list-inline-item">
<img src="${result.Poster}" alt="">
<p>${result.Title}</p>
</li>`
results.insertAdjacentHTML("beforeend", movieTag)
})
})