Update a dictionary item

Updates a specific key-value pair within a dictionary.