Q:

String.valueOf((String)jsonBodyMap.get(pfield))) is retuning null from the JSON object

Hi im trying to fetch the string value from JSOn object dynamically and its retuning null, works fine if i specify the field names but i dont want to hardcode the field names want to pass it pass it dynamically.  any suggestions?  here is sample code(Line 27 to 29). 
public PageReference  JSON_ResponseHandler() {        
       String jsonbody ='{"state":"WA","retirementAge":"65","age":"51","firstName":"ku","lastName":"su","dateOfBirth":"01/07/1964"}';
        Map<String,String> FieldMap=util.getFieldMap();
        Map<String,String> FieldTypeMap=util.getFieldTypeMap();
        string qFields=String.join(FieldMap.values(), ', ');
        string uNum='';
        String pName;
        Map<String, Object> jsonBodyMap = (Map<String, Object>)JSON.deserializeUntyped(jsonbody);

        if(!string. IsBlank((String)jsonBodyMap.get('userNum'))){
            uNum = ! string. IsBlank((String)jsonBodyMap.get('userNum'))?String.valueOf((String)jsonBodyMap.get('userNum')):'';
        }

        string query ='SELECT ' + qFields
                       + ' FROM contact'
                       + ' WHERE user_num__c = \'' + String.escapeSingleQuotes(uNum) + '\''
                       + ' LIMIT 1';
        system.debug(LoggingLevel.error,'query#'+query);

        p=Database.query(query);

        for(String pfield:FieldMap.keySet()){
            string s= string.valueOf((String)jsonBodyMapLcase.get(pfield));
            system.debug(LoggingLevel.error,'sXX=' + s);

            if('Text'==FieldTypeMap.get(pfield)){
                system.debug(LoggingLevel.error,'field Value from Jsonbody:'+String.valueOf((String)jsonBodyMap.get(pfield)));
                // retuns allways NULL, if i specify the field name then its retunring the value.  its not working if we pass it dynamically
                p.put(FieldMap.get(pfield),String.valueOf((String)jsonBodyMap.get(pfield)));
            }
        }
        system.debug(LoggingLevel.error,'updated Participant=' + p);
        update p;
        return new PageReference('/'+p.id);

    }

A:

For the map returned by JSON.deserializeUntyped the key values are case sensitive.  So "firstName" would work but "FirstName" or "firstname" would not.  The values in your FieldMap presumably do not match the casing in your JSON. 
Writing a case-insensitive wrapper for the map would be one way to work-around the problem.  Or fix a casing convention that is easy to use everywhere e.g. always lower case. 
A wrapper might look like this:
public class CaseInsensitiveLookup {

    private Map<String, Object> m;
    private Map<String, String> keys = new Map<String, String>();

    public CaseInsensitiveLookup(Map<String, Object> m) {
        this.m = m;
        this.keys = new Map<String, String>();
        for (String key : m.keySet()) {
           keys.put(key.toLowerCase(), key);
        }
    }

    public Object get(String caseInsensitiveKey) {
        return m.get(keys.get(caseInsensitiveKey.toLowerCase()));
    }
}

Map<String, Object> jsonBodyMap = ...
CaseInsensitiveLookup lookup = new CaseInsensitiveLookup(jsonBodyMap);
...
    p.put(FieldMap.get(pfield), (String) lookup.get(pfield));

