remove in dictionary

imageAvata = params["avatar"] as! UIImageView
imagecover = params["cover"] as! UIImageView
if let aDictionaryIndex = params.indexForKey("avatar") {
// This will remove the key/value pair from the dictionary and return it as a tuple pair.
let (key, value) = params.removeAtIndex(aDictionaryIndex)
print(key) // anotherKey
print(value) // bar
}
if let aDictionaryIndex = params.indexForKey("cover") {
// This will remove the key/value pair from the dictionary and return it as a tuple pair.
let (key, value) = params.removeAtIndex(aDictionaryIndex)
print(key) // anotherKey
print(value) // bar
}