 interface KeyValue {
    key: string;
    value: string;
}

// Function to convert an array of key-value objects to an object
export function arrayToObject(arr: KeyValue[] | null | undefined ): Record<string, string> {
    if(!arr){
        return {}
    }
    return arr.reduce((obj, item) => {
        obj[item.key] = item.value;
        return obj;
    }, {} as Record<string, string>);
}
