Reputation: 35
My JSON structure is as follows-:
[how can i access this json structure for firebase realtime db, basically i want to print
id(numeric num), then the email_id][1]
https://i.sstatic.net/UslTG.png
I want to read the numeric value and email and that numeric value will going to change every time and i want to read the value latestly added inside article/.?
Upvotes: 1
Views: 175
Reputation: 11
How to retrive id(number- and also there is no key to read that num) and email
firebase.database().ref('/article/' + num + '/email/').on('value',function(snapshot) {
var email = snapshot.val().email
// ...
});
More information in: https://firebase.google.com/docs/database/web/read-and-write
Upvotes: 1