mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-03 20:04:58 +00:00
front to see if data is correct
This commit is contained in:
@@ -36,6 +36,11 @@ document.querySelectorAll(".btn").forEach((button) => {
|
|||||||
// Parse the data and show it on the website
|
// Parse the data and show it on the website
|
||||||
async function parseData() {
|
async function parseData() {
|
||||||
const data = await fetchData();
|
const data = await fetchData();
|
||||||
|
|
||||||
|
if(!data){
|
||||||
|
console.error("No data received");
|
||||||
|
return;
|
||||||
|
}
|
||||||
const sensorDataContainer = document.getElementById("sensor-data");
|
const sensorDataContainer = document.getElementById("sensor-data");
|
||||||
sensorDataContainer.innerHTML = ""; // Clear previous data
|
sensorDataContainer.innerHTML = ""; // Clear previous data
|
||||||
//for each object in json array create a new paragraph element and append it to the sensorDataContainer
|
//for each object in json array create a new paragraph element and append it to the sensorDataContainer
|
||||||
|
Reference in New Issue
Block a user