export default {

    formatData(data,object:{label:string,value:string}){

        let keys = Object.keys(object);
        return data.map((item)=>{

            let resultItem = {};
            keys.map((cItem,index)=> {

                if (typeof item === 'object') {
                    resultItem[cItem] = item[object[cItem]];
                } else {
                    resultItem[cItem] = item+(object[cItem] || '');
                }

            });

            return resultItem;

        })

    }

}