这是数据库的结构,我必须获取一个this.af.database.object('/profile/' + this.uid).subscribe(profile => {
console.log(profile);
this.uid = profile.uid;
console.log(this.uid);
});
。
# Getting Started
# Heading 1
## SubHeading 1
## SubHeading 2
### SubSubHeading 1
### SubSubHeading 2
#### SubSubSubHeading 1
## SubHeading 3
答案 0 :(得分:1)
你可以试试这个:
this.af.database.object('/profile/' + this.uid).subscribe(profile => {
var obj = {};
profile.forEach(item => {
obj[item["$key"]] = item["$value"];
});
console.log(obj);
});