Add function to convert key/values to Map.