def dict_search_value(d, kname):
    """Search for a key inside a dictionary, visiting it in a recursive way
    and return the value of this key.

    d: dictionary to search into
    kname: key name to search for
    """
    if type(d) == dict:
        for k, v in d.items():
            if type(v) == dict:
                value = dict_search_value(v, kname)
                if value:
                    return value
            if type(v) == list:
                if len(v) > 0:
                    for element in v:
                        if type(element) == dict:
                            value = dict_search_value(element, kname)
                            if value:
                                return value
            if k == kname:
                return v