繁体   English   中英

如何以json格式访问Firebase数据库值

[英]How to access firebase database value in json format

我的JSON结构如下:

[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.stack.imgur.com/UslTG.png

我想读取数字值和电子邮件,并且该数字值每次都会改变,并且我想读取article /中最新添加的值。

如何获取ID(数字,也没有密钥来读取该数字)和电子邮件

firebase.database().ref('/article/' + num + '/email/').on('value',function(snapshot) {
 var email = snapshot.val().email
  // ...
});

有关更多信息,请访问: https : //firebase.google.com/docs/database/web/read-and-write

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM