function formatWithSettings(data, settingsKey = 'companysettings') {
    return data.map(item => {
        return {
            ...item.dataValues,
            [settingsKey]: Object.keys(item[settingsKey]).reduce((acc, cur) => {
                acc[item[settingsKey][cur].key] = item[settingsKey][cur].value;
                return acc;
            }, {}),
        };
    });
}
