I'm working on a simple project of a web app. It gets data from Firebase realtime database. I've already managed to get data from it but only one, specific record. It works like this:
var hum = firebase.database().ref().child('Ostatni_pomiar');
hum.once("value", snap => {
var wilgotnosc = snap.child("Wilgotnosc").val();
$("#wilg").append(wilgotnosc.toFixed(1) + "%");
});
The case is, I have a device based on ESP32 which sends data to the database every 35 mins. I would like to get the last 10 records to show it on my web page as a table or whatever else.
Structure of the database looks like:
So one record would be 16:15 = humidity, pressure, temperature. The second record would be 16:50 = humidity, pressure, temperature, And so on, and so on...
Any idea how to achieve that? :)
Thank you in advance!