I am attempting to showcase an image within a div using HTML. I utilized fetch to retrieve the JSON data from the following API: . The response contains JSON data with the image URL labeled "primaryImage". While I can display it as text, I am encountering difficulties displaying it as an image.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Image</title>
</head>
<body>
<img id="test">
<script>
let getimage = document.getElementbyId('test');
getimage.src= "data"
fetch('https://collectionapi.metmuseum.org/public/collection/v1/objects/435828')
.then((response) => response.json())
.then((data) => texting.innerText = data.primaryImage);
</script>
</body>
</html>