I am working on an API response in react js the API response is displayed in an array. i want to iterate this array in my front end. this my API code.
this is my API.
{ "apiEndPoint": "http://128.199.69.17:8000/api/" }
this is API code.
export async function cards() {
return await axios({
method: "GET",
url: storeCardsUrl,
});
}
const getCardData = async () => {
try {
let { data } = await cards();
setCard(data);
setShowCard(false);
console.log(data);
console.log(card[0]);
} catch (e) {
console.error(e);
}
};
useEffect(() => {
getData();
getCardData();
}, []);
this is my API response. https://i.stack.imgur.com/sYEdC.png