Error on Saving Nested Map ([String: Any]) in UserDefaults
I’m trying to save a nested Map in Swift, and it’s not working as expected. The Map structure looks something like this: [ “racesMap”: [ 32904: “Races(bestTime: 1, bonusRanking: 0, countryID: 0, …)”, 32905: “Races(bestTime: 1, bonusRanking: 0, countryID: 0, …)”, ], “userName”: “Alpha”, ] let inputMap: [String: Any] = above map defaults.set(inputMap, forKey: “keyFormapSaving”) … Read more