Completed code that finds vakue coresponding to key, from a string that has key value pair pipe seperated