Is this the right way to save array of dictionaries in tableView using UserDefaults in Swift 3? var arrNotes = [String:String]
func saveNotesArray () {
UserDefaults.standard.set(arrNotes, forKey: "notes")
UserDefaults.standard.synchronize()
}
"[String: String]" Means a dictionary where the keys and the values are Strings.
"[[String: String]]" Means an array that contains dictionaries where the keys and values are strings.
create a dictionary of string and an array to hold them
add the array to userDefaults
get the array of dictionaries from the userdefaults