const scraper = require("table-scraper"); //scrape a html table
scraper
.get("https://www.gkd.bayern.de/de/meteo/wind/isar/ammerseeboje-16601050/messwerte/tabelle")
//that is the list of wind values for each hour
.then(function (tableData) {
console.log(tableData[1]); //that is the table as an object
})
console returns :
[
{ Datum: '05.06.2021 21:00', 'Wind [m/s]': '5,7' },
{ Datum: '05.06.2021 20:00', 'Wind [m/s]': '5,4' },
....
]
tableData[1][0].Datum - ok defines the datum
but
tableData[1][0].'Wind [m/s]' - will return undefined...
How can I get the value of eg. 5,7?
Thanks