I am trying to retrieve every object stored in Firebase. Not sure how to go ahead. The following is my code and snap.value printed. I need to retrieve String “cbc” and “cp24” as well as values for datasaved and url. “cbc” and “cp24” are names I entered when saving.
Ref_UsersBase.observeEventType(.Value, withBlock: { snapshot in
if let snapshots = snapshot.children.allObjects as? [FDataSnapshot] {
for snap in snapshots {
print(snap.value)
}
}
})
{
// Here is snap.value printed:
{
“-KGOzXm1lLtyS23cOR-G” = {
cp24 = {
datesaved = “Apr 27, 2016”;
url = “cp24 weather - Google Search”;
};
};
“-KGOznhRN0J2OVlIogZ0” = {
cbc = {
datesaved = “Apr 27, 2016”;
url = “Toronto - CBC News”;
};
};
}