def get_field_value(data, parameter):
    """get json value for a nested attribute."""
    retval = None
    parameter = parameter[1:] if parameter and parameter.startswith('.'
        ) else parameter
    fields = parameter.split('.') if parameter else None
    if data and fields:
        retval = data
        for field in fields:
            retval = retval[field
                ] if retval and field in retval and isinstance(retval, dict
                ) else None
    return retval
