Advertisement
Guest User

Untitled

a guest
Oct 10th, 2022
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const getData = async (): Promise<any> => {
  2.     const response = await axios.get(`https://xxxx`);
  3.     const data = response.data;
  4.     const names = data?.map((inside: any) => {
  5.         return {
  6.             firstName: inside?.firstName,
  7.             surName: inside?.surName.toUpperCase(),
  8.         };
  9.     });
  10.     return names;
  11. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement