Basically, I have a structure called, topics which contains Title, Description and a Published flag (see screenshot below for clarific
Title
Description
Published
self.ref = FIRDatabase.database().referenceFromURL(FIREBASE_URL).child("topics"). queryOrderedByChild("published").queryEqualToValue(true) .observeEventType(.Value, withBlock: { (snapshot) in for childSnapshot in snapshot.children { print(snapshot) } })