I am trying to link my js vanilla code with json. I want to show value of object key that input in the search box. I add an example image of what i want. Thanks image of result type that i want
My basic html and script:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sono brillo</title>
</head>
<body>
<h1>hello</h1>
<input id = "userInput" > <br> <br>
<button onclick="myFunction()" > Run </button>
<h1 id="message"> </h1>
<style>
body{background-color: darkblue; text-align: center; color: floralwhite;}
</style>
<script>
function myFunction() {
let userInput = document.querySelector("#userInput");
let message = document.querySelector("#message");
message.innerHTML = userInput.value;
}
</script>
</body>
</html>
and my json
https://drive.google.com/file/d/1ELIw__G5fXP3OZVTd-AZ9tu7YjzL-2G9/view?usp=sharing