Extracts a value from a simple key-value pair.