I have an dictionary like below:
var param = [String: Any]()
param = ["locale": "en",
"token": "82ETaBYbiz2ZM2Kqg7eL8z3VL0",
"taskId": 123]
Now I want to add some other values in same dictionary condition based like below:
if userType == "ADMIN" {
param = ["userType": "ADMIN"]
} else {
param = ["userType": "USER"]
}
But when I do like the same it replaces old value. So is there any way to perform this? Coz I have lots of conditions and lots of values to add to the dictionary. Please suggest the effective way to handle this.