const request = { headers: { "Accept": "application", "Content-Type": "application/json", }, method: "GET", url: '', } as any;
const result = await axios(request);
result.data.data.map(async (ad: any) => {
const request2 = {
headers: {
"Accept": "application",
"Content-Type": "application/json",
},
method: "GET",
url: '',
} as any;
const result2 = await axios(request2);
ad.preview = result2.data.data[0].body;
})
return result.data.data;
preview key is not getting appended