function reverseDictionary(data) {
    // https://ultimatecourses.com/blog/reverse-object-keys-and-values-in-javascript
    return Object.fromEntries(Object.entries(data).map(([key, value]) => [value, key]));
}
Reverses the keys and values of an object.

@param {Object} data The object to reverse.
@returns {Object} The reversed object.
@see https://ultimatecourses.com/blog/reverse-object-keys-and-values-in-javascript