1

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/.?

1
  • 1
    It looks like some details are missing in your question. Can you please fill them in? Do take a look at our guide for tips on asking good questions: stackoverflow.com/help/how-to-ask Commented Apr 3, 2018 at 11:10

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.