How I can map the response data object from axios to custom object? Here is the code below.Can I use map? As in, response.data.results.map?
public getAllPromise(): Promise<any[]> { return new Promise((resolve, reject) => { axios.get('https://www.xxxx').then((response) => { resolve(response.data.results); console.log(response +' -----from service'); }).catch((error) => { reject(error); }); }); }