我正在尝试在Firebase中执行查询,并将快照转换为数组。但是快照中的几个节点给了我这样的字符串:
"<null>"
代码:
Database.database().reference().child("users").child(myUser!.key).child("children").child(self.key).observe(.childChanged, with: { snapshot in
if snapshot.value != nil {
Children.updateDataChildren(children: self, values: [snapshot.key:snapshot.value!])
}
})
输出:
["birth": 1543406045721, "diaries": {
diaryIndicator = {
2018 = {
10 = (
"<null>",
{
feeding = 1;
}
);
};
};
}, "name": Teste1]
Firebase: