I've been going around in circles about something that seems really simple, but I can't figure out it out. I simply want to read data from Firebase and save it in array so I can use it in my app. I know how to read the data as the following works for me to print out in the console:
var ref = Firebase(url: "<MYFIREBASEURL>")
ref.observeEventType(.ChildAdded, withBlock: { snapshot in
print(snapshot.value.objectForKey("title"))
})
I tried some of these approaches to save to an array, but I can't get it to work as it doesn't directly address my simpler question.
Adding Firebase data into an array
How to save data from a Firebase query
Thanks for your help!