i have a database in Firebase look like:

and two objects:
class Area: NSObject {
let itemRef:FIRDatabaseReference?
var id:String?
var name:String?
var cities : [City] = []
var collapsed: Bool
}
and
class City: NSObject {
var id:String?
var name:String?
init(_ id:String,_ name: String) {
self.id = id
self.name = name
}
override init(){
}
and this is my parsing code :
func makeData(){
let ref = FIRDatabase.database().reference().child("area")
ref.observe(.childAdded, with: {
(snapshot) in
if let dictionary = snapshot.value as? [String:AnyObject]{
print(dictionary)
}
})
}
I try to parse the data in snapshot to my array Area but i cannot how i can do it?
arena, but your JSON doesn't show such a child. Please replace the screenshot of the JSON with the actual text of the JSON and include the node that is referenced in the code. You can get the JSON as text by clicking the "Export JSON" link in your Firebase Database console.