def keyGen(attributes, data):
    """
    Traverses the data and returns the key generated based on the given attributes.

    **Parameters**:
        attributes : list
            A list of attributes which define the key.
        data : dict
            The data for which the key has to be generated for.

    **Returns**:
        `str` with the concatinated attributes as a key.
        `None` if an error occured while finding the key.
    """
    key = ""
    try:
        for attribute in attributes:
            splitSet = attribute.split('.')
            _data = data
            for split in splitSet:
                _data = _data[split]
            key += str(_data)
        return key
    except:
        pass
    return None