def get_value(d, key):
    """Return value from source based on key."""

    for k in key.split("."):
        if k in d:
            d = d[k]
        else:
            return None
    if isinstance(d, list):
        return ", ".join([str(i) for i in d])
    else:
        return d