I have stored a users home address in firebase as an array. It looks like this:
I am now trying to grab all of my users data and store them into a dictionary like this:
The User()
part of the code is defined above like this:
var users = [User]()
the [User]()
part of it comes from a user.swift file which is here:
class User: NSObject {
var fullName: String?
var email: String!
var userPhoto: String?
var homeAddress: [String:[Double]]()
var schoolOrWorkAddress: String!
}
the error is with the homeAddress
part of it.
In the file I create variables for all my user data storage. My question now is how do I set home address to a value type of an array as that dictionaries key value. Can anyone help? Feel free to comment if you have any questions in helping me.