Beginner to Javascript & HTML here, I'm trying to search up how to pass an object from a JSON file into a HTML file and use a key value pair in a link's HREF tag. I'll try my best to illustrate below
JSON FILE:
{
"apple" : "https://www.apple.com",
"orange" : "https://www.orange.com"
}
INTENDED HTML FILE:
<!DOCTYPE html>
<body>
<link href={apple}> //ideally the json object brought in and key value pair gives us href="https://www.apple.com
</body>
</html>
How can I do this? Thank you!