def _iterate_over_nested_obj(obj, key):
    """It iterates over the nested dict object.
    It iterates over two types of data
    * list
    * dict

    for the rest data type it returns the value

    Args:
        obj (any type): object to process
        key (str, int): key to find in object
    """

    if isinstance(obj, dict):
        if obj.get(key):
            return obj[key]
    elif isinstance(obj, list):
        for item in obj:
            value = _iterate_over_nested_obj(item, key)
            if value:
                return value
        return None
    else:
        return None