mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-07-06 01:41:42 +02:00
ok
This commit is contained in:
+8
-19
@@ -12,24 +12,13 @@ fetch('igate_conf.json')
|
||||
// Display JSON data in the HTML
|
||||
function displayJSONData(data) {
|
||||
const jsonContainer = document.getElementById('json-container');
|
||||
/*jsonContainer.innerHTML = '';
|
||||
|
||||
var jsonData = jsonContainer.textContent;
|
||||
|
||||
// Parse the JSON data into a JavaScript object
|
||||
try {
|
||||
var parsedData = JSON.parse(jsonData);
|
||||
|
||||
// Access the data in the JavaScript object
|
||||
var callsign = parsedData.callsign;
|
||||
//var age = parsedData.stationMode;
|
||||
//var city = parsedData.city;
|
||||
|
||||
// Display the parsed data
|
||||
console.log("Callsign : " + callsign);
|
||||
//console.log("Age: " + age);
|
||||
//console.log("City: " + city);
|
||||
} catch (error) {
|
||||
console.error("Error parsing JSON: " + error.message);
|
||||
}
|
||||
// jsonContainer.innerHTML = JSON.stringify(data, null, 2);
|
||||
data.forEach(item => {
|
||||
const itemDiv = document.createElement('div');
|
||||
itemDiv.textContent = JSON.stringify(item, null, 2);
|
||||
jsonContainer.appendChild(itemDiv);
|
||||
});*/
|
||||
|
||||
jsonContainer.innerHTML = JSON.stringify(data, null, 2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user