export function convertConfigeDataToObject(data: any) {

  if (!data) {
    return [];
  }

  if (data instanceof FormData) {
    // Convert FormData to an object => {key: value} 
    const formDataObj: { [key: string]: any; } = {};
    data.forEach((value, key) => {
      formDataObj[key] = value;
    });

    return formDataObj;
  }

  return data;

}
