Skip to content

Commit

Permalink
fixed "details" .json
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRedacted committed Sep 19, 2024
1 parent 939553f commit b2f43ca
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions card.html
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,11 @@ <h1>Phone</h1>
const contactData = await response.json(); // Parse the JSON data
const contactList = document.querySelector('body'); // Get the HTML element to display contact info

for (const profile of contactData.profile) {
fullName.innerHTML = profile.name;
document.title = profile.name;
headline.innerHTML = profile.headline;
bio.innerHTML = bio.headline;
for (const details of contactData.details) {
fullName.innerHTML = details.name;
document.title = details.name;
headline.innerHTML = details.headline;
bio.innerHTML = details.bio;
}

// Iterate over the contacts and display using a for...of loop to allow async/await in the loop
Expand Down

0 comments on commit b2f43ca

Please sign in to comment.