I really don't know how I can display the array JSON data on my webpage using a card. My code is shown below your help will be highly appreciated.
<body>
<h1> Users data</h1>
<div class="card">
</div>
<script>
const api_url = "https://api.airtable.com/v0/appBTaX8XIvvr6zEC/tblYPd5g5k5IKIc98?api_key=##";
async function getAirtable() {
const response = await fetch(api_url);
const data = await response.json();
const allData = data.records.map((rec) => rec.fields);
// allData = [
// {
// Id: 79,
// Name: "Julia A. Robles",
// avatar:
// "https://s3.amazonaws.com/uifaces/faces/twitter/pixeliris/128.jpg",
// occupation: "Prosthodontist",
// },
// {
// Id: 29,
// Name: "Matthew H. Glover",
// avatar:
// "https://s3.amazonaws.com/uifaces/faces/twitter/flame_kaizar/128.jpg",
// occupation: "Transportation attendant",
// },
// ];
console.log(allData);
}
</script>
</body>