【发布时间】:2018-01-27 12:21:53
【问题描述】:
我想在 AllocEmp 中获取推送 id 的值(111122223333)。 firebase 数据库:
{
"AllocEmp" : {
"-L3c47chqb35p0Ndo_XB" : "111122223333"
},
"complaintDate" : "Wed Jan 10 18:40:34 GMT+05:30 2018",
"complaintDesc" : "ggshwhwuuww\ngshhsjsn",
"complaintLM" : "annA",
"complaintLoc" : "ist",
"complaintName" : "Continous Fluctuations",
"defaultTime" : "Thu Jan 11 00:40:34 GMT+05:30 2018",
"department" : "Electricity",
"resolvingTime" : "6",
"uid" : "123456788765"
}
我正在使用代码:
var fb =
firebase.database().ref().child('UserComplaints').child('AllocEmp');
fb.once('value', snap => {
alert(snap.val);
});
此代码返回空值。 请帮帮我
【问题讨论】:
标签: javascript firebase web firebase-realtime-database