Hello. I have the following JSON data and would like to create a constant in JS contaning the value "17.6", but don't know how to create the data string. I hope somebody can help me. Thanks!
JSON data:
v value:
v 0:
date: 1657274400000
value: "17.6"
quality: "G"
updated: 1657274400000
Javascript:
<script>
fetch(
https://opendata-download-metobs.sm.../1/station/87440/period/latest-hour/data.json
)
.then(response => response.json())
.then(data => {
const tempSpan = document.querySelector("#tempSpan");
tempSpan.innerHTML = data.?????;
});
</script>
JSON data:
v value:
v 0:
date: 1657274400000
value: "17.6"
quality: "G"
updated: 1657274400000
Javascript:
<script>
fetch(
https://opendata-download-metobs.sm.../1/station/87440/period/latest-hour/data.json
)
.then(response => response.json())
.then(data => {
const tempSpan = document.querySelector("#tempSpan");
tempSpan.innerHTML = data.?????;
});
</script>