def flattenDict(d):
    """Reduces the depth of a dictionary to 1, parent keys are ignored.

    >>> d = {'a': 1, 'c': {'e': 5, 'd': 4}, 'b': 2, 'f': {'g': {'h': 8}}}
    >>> flattenDict(d)
    {'a': 1, 'h': 8, 'b': 2, 'e': 5, 'd': 4}
    """
    result = {}
    for k, v in d.iteritems():
        if isinstance(v, dict):
            result.update(flattenDict(v))
        else:
            result.update({k:v})
    return result